Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/felixge/node-lazy-socket
A stateless socket that always lets you write().
https://github.com/felixge/node-lazy-socket
Last synced: about 2 months ago
JSON representation
A stateless socket that always lets you write().
- Host: GitHub
- URL: https://github.com/felixge/node-lazy-socket
- Owner: felixge
- Created: 2011-11-17T15:53:26.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2013-08-30T17:41:43.000Z (over 11 years ago)
- Last Synced: 2024-10-11T15:19:21.064Z (2 months ago)
- Language: JavaScript
- Homepage:
- Size: 115 KB
- Stars: 13
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# lazy-socket
[![Build Status](https://secure.travis-ci.org/felixge/node-lazy-socket.png)](http://travis-ci.org/felixge/node-lazy-socket)
A stateless socket that always lets you write().
If there is an error, all previous `write()` callbacks will be honored. A new
connection will be established as soon as the next `write()` occurs. Writes
will not be retried.## Install
```
npm install lazy-socket
```## Usage
```js
var LazySocket = require('lazy-socket');
var socket = LazySocket.createConnection(80, 'example.org');
socket.write('something', 'utf-8', function(err) {
// Even if example.org is down, this callback is guaranteed to fire, and
// there is no more error handling to do on your end.
});
```## License
This module is licensed under the MIT license.