{"_id":"turbo-net","_rev":"395165","name":"turbo-net","description":"Low level TCP library","dist-tags":{"latest":"1.4.0"},"maintainers":[{"name":"mafintosh","email":""}],"time":{"modified":"2021-08-04T04:09:00.000Z","created":"2017-02-09T15:28:56.224Z","1.4.0":"2018-03-18T19:15:44.460Z","1.3.0":"2018-03-03T20:48:27.830Z","1.2.3":"2018-03-02T18:19:01.688Z","1.2.2":"2018-03-02T18:17:45.826Z","1.2.1":"2018-03-02T07:49:36.374Z","1.2.0":"2018-03-01T20:36:13.753Z","1.1.0":"2018-03-01T20:22:56.401Z","1.0.1":"2018-02-28T18:21:32.355Z","1.0.0":"2018-02-28T17:40:48.741Z","0.0.2":"2017-02-09T18:27:28.089Z","0.0.1":"2017-02-09T15:32:21.056Z","0.0.0":"2017-02-09T15:28:56.224Z"},"users":{},"author":{"name":"Mathias Buus","url":"@mafintosh"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/turbo-net.git"},"versions":{"1.4.0":{"name":"turbo-net","version":"1.4.0","description":"Low level TCP library","main":"index.js","dependencies":{"napi-macros":"^1.3.0","node-gyp-build":"^3.3.0","unordered-set":"^2.0.0"},"devDependencies":{"prebuildify":"^2.6.0","speedometer":"^1.0.0","standard":"^11.0.0","tape":"^4.9.0"},"scripts":{"install":"node-gyp-build","test":"standard && tape test/*.js","prebuild":"prebuildify --napi"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/turbo-net.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/turbo-net/issues"},"homepage":"https://github.com/mafintosh/turbo-net","gitHead":"a9dc283a96c60df2eadd702fdc98df5e54bf4e4b","_id":"turbo-net@1.4.0","_npmVersion":"5.6.0","_nodeVersion":"9.7.1","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"dist":{"shasum":"c35d71bc2be20455779da1811ae120e65638c117","size":122406,"noattachment":false,"key":"/turbo-net/-/turbo-net-1.4.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/turbo-net/download/turbo-net-1.4.0.tgz"},"maintainers":[{"name":"mafintosh","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/turbo-net_1.4.0_1521400544396_0.7583477634561924"},"_hasShrinkwrap":false,"publish_time":1521400544460,"_cnpm_publish_time":1521400544460},"1.3.0":{"name":"turbo-net","version":"1.3.0","description":"Low level TCP library","main":"index.js","dependencies":{"napi-macros":"^1.3.0","node-gyp-build":"^3.3.0","unordered-set":"^2.0.0"},"devDependencies":{"prebuildify":"^2.6.0","speedometer":"^1.0.0","standard":"^11.0.0","tape":"^4.9.0"},"scripts":{"install":"node-gyp-build","test":"standard && tape test/*.js","prebuild":"prebuildify --napi"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/turbo-net.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/turbo-net/issues"},"homepage":"https://github.com/mafintosh/turbo-net","gitHead":"a70b8f9f8c75d197c31a40d7278c7374fb6b0b32","_id":"turbo-net@1.3.0","_npmVersion":"5.6.0","_nodeVersion":"9.6.1","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"dist":{"shasum":"029b06383f34d58ac070fb9bac267b034179b7ef","size":122396,"noattachment":false,"key":"/turbo-net/-/turbo-net-1.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/turbo-net/download/turbo-net-1.3.0.tgz"},"maintainers":[{"name":"mafintosh","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/turbo-net_1.3.0_1520110107774_0.8933014397893524"},"_hasShrinkwrap":false,"publish_time":1520110107830,"_cnpm_publish_time":1520110107830},"1.2.3":{"name":"turbo-net","version":"1.2.3","description":"Low level TCP library","main":"index.js","dependencies":{"napi-macros":"^1.3.0","node-gyp-build":"^3.3.0","unordered-set":"^2.0.0"},"devDependencies":{"prebuildify":"^2.6.0","speedometer":"^1.0.0","standard":"^11.0.0","tape":"^4.9.0"},"scripts":{"install":"node-gyp-build","test":"standard && tape test/*.js","prebuild":"prebuildify --napi","prebuild-ia32":"prebuildify --napi --arch=ia32"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/turbo-net.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/turbo-net/issues"},"homepage":"https://github.com/mafintosh/turbo-net","gitHead":"7763bdcd1b689bb7e9e3c7c46955aff07fabbc16","_id":"turbo-net@1.2.3","_npmVersion":"5.6.0","_nodeVersion":"9.6.1","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"dist":{"shasum":"9b972632f302cdb77d27a3d90cda68f2272d2f61","size":22828,"noattachment":false,"key":"/turbo-net/-/turbo-net-1.2.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/turbo-net/download/turbo-net-1.2.3.tgz"},"maintainers":[{"name":"mafintosh","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/turbo-net_1.2.3_1520014741584_0.4394491668335059"},"_hasShrinkwrap":false,"publish_time":1520014741688,"_cnpm_publish_time":1520014741688},"1.2.2":{"name":"turbo-net","version":"1.2.2","description":"Low level TCP library","main":"index.js","dependencies":{"napi-macros":"^1.3.0","node-gyp-build":"^3.3.0","unordered-set":"^2.0.0"},"devDependencies":{"prebuildify":"^2.6.0","speedometer":"^1.0.0","standard":"^11.0.0","tape":"^4.9.0"},"scripts":{"test":"standard && tape test/*.js","prebuild":"prebuildify --napi","prebuild-ia32":"prebuildify --napi --arch=ia32","install":"node-gyp rebuild"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/turbo-net.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/turbo-net/issues"},"homepage":"https://github.com/mafintosh/turbo-net","gypfile":true,"gitHead":"a318fd338b85209197ad1cac481dc57cb4827c68","_id":"turbo-net@1.2.2","_npmVersion":"5.6.0","_nodeVersion":"9.6.1","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"dist":{"shasum":"34fa64929186037d840f5cb6a10eac237fb4c66f","size":22819,"noattachment":false,"key":"/turbo-net/-/turbo-net-1.2.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/turbo-net/download/turbo-net-1.2.2.tgz"},"maintainers":[{"name":"mafintosh","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/turbo-net_1.2.2_1520014665750_0.5171302406335694"},"_hasShrinkwrap":false,"publish_time":1520014665826,"_cnpm_publish_time":1520014665826},"1.2.1":{"name":"turbo-net","version":"1.2.1","description":"Low level TCP library","main":"index.js","dependencies":{"napi-macros":"^1.3.0","node-gyp-build":"^3.2.2","unordered-set":"^2.0.0"},"devDependencies":{"speedometer":"^1.0.0","standard":"^11.0.0","tape":"^4.9.0"},"scripts":{"test":"standard && tape test/*.js","install":"node-gyp rebuild"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/turbo-net.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/turbo-net/issues"},"homepage":"https://github.com/mafintosh/turbo-net","gypfile":true,"gitHead":"e8fb4d8d4a44035a5c98eec951d870ca2ea2190b","_id":"turbo-net@1.2.1","_npmVersion":"5.6.0","_nodeVersion":"9.6.1","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"dist":{"shasum":"f13e5f1be06dd7d47c15e93f8b5fb671b60edb0d","size":8434,"noattachment":false,"key":"/turbo-net/-/turbo-net-1.2.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/turbo-net/download/turbo-net-1.2.1.tgz"},"maintainers":[{"name":"mafintosh","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/turbo-net_1.2.1_1519976976171_0.28642529977944053"},"_hasShrinkwrap":false,"publish_time":1519976976374,"_cnpm_publish_time":1519976976374},"1.2.0":{"name":"turbo-net","version":"1.2.0","description":"Low level TCP library","main":"index.js","dependencies":{"napi-macros":"^1.3.0","node-gyp-build":"^3.2.2","unordered-set":"^2.0.0"},"devDependencies":{"speedometer":"^1.0.0","standard":"^11.0.0","tape":"^4.9.0"},"scripts":{"test":"standard && tape test/*.js","install":"node-gyp rebuild"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/turbo-net.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/turbo-net/issues"},"homepage":"https://github.com/mafintosh/turbo-net","gypfile":true,"gitHead":"0e362e063ab7cd80b6d2ed38b9553af93b8c5a2a","_id":"turbo-net@1.2.0","_npmVersion":"5.6.0","_nodeVersion":"9.6.1","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"dist":{"shasum":"ef23dca018ca6734655eed054e29d3fb70fc98c9","size":8325,"noattachment":false,"key":"/turbo-net/-/turbo-net-1.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/turbo-net/download/turbo-net-1.2.0.tgz"},"maintainers":[{"name":"mafintosh","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/turbo-net_1.2.0_1519936573522_0.6418540017474896"},"_hasShrinkwrap":false,"publish_time":1519936573753,"_cnpm_publish_time":1519936573753},"1.1.0":{"name":"turbo-net","version":"1.1.0","description":"Low level TCP library","main":"index.js","dependencies":{"napi-macros":"^1.3.0","node-gyp-build":"^3.2.2","unordered-set":"^2.0.0"},"devDependencies":{"speedometer":"^1.0.0","standard":"^11.0.0","tape":"^4.9.0"},"scripts":{"test":"standard && tape test/*.js","install":"node-gyp rebuild"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/turbo-net.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/turbo-net/issues"},"homepage":"https://github.com/mafintosh/turbo-net","gypfile":true,"gitHead":"c52621a9e83d538f547f851b24899dc7919f49e3","_id":"turbo-net@1.1.0","_npmVersion":"5.6.0","_nodeVersion":"9.6.1","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"dist":{"shasum":"189c8397285cc5fe760ee98c55b60c7d9168b822","size":8307,"noattachment":false,"key":"/turbo-net/-/turbo-net-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/turbo-net/download/turbo-net-1.1.0.tgz"},"maintainers":[{"name":"mafintosh","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/turbo-net_1.1.0_1519935776170_0.4868878651859685"},"_hasShrinkwrap":false,"publish_time":1519935776401,"_cnpm_publish_time":1519935776401},"1.0.1":{"name":"turbo-net","version":"1.0.1","description":"Low level TCP library","main":"index.js","dependencies":{"napi-macros":"^1.3.0","node-gyp-build":"^3.2.2","unordered-set":"^2.0.0"},"devDependencies":{"speedometer":"^1.0.0","standard":"^11.0.0","tape":"^4.9.0"},"scripts":{"test":"standard && tape test/*.js","install":"node-gyp rebuild"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/turbo-net.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/turbo-net/issues"},"homepage":"https://github.com/mafintosh/turbo-net","gypfile":true,"gitHead":"2f9cf85ecaac082e08db71723f662bf6a79e1d8c","_id":"turbo-net@1.0.1","_npmVersion":"5.6.0","_nodeVersion":"9.6.1","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"dist":{"shasum":"8c7635132db869061f13bd258dca35ded05d4b28","size":7615,"noattachment":false,"key":"/turbo-net/-/turbo-net-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/turbo-net/download/turbo-net-1.0.1.tgz"},"maintainers":[{"name":"mafintosh","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/turbo-net_1.0.1_1519842092285_0.9288434622146045"},"_hasShrinkwrap":false,"publish_time":1519842092355,"_cnpm_publish_time":1519842092355},"1.0.0":{"name":"turbo-net","version":"1.0.0","description":"Low level TCP library","main":"index.js","dependencies":{"node-gyp-build":"^3.2.2","unordered-set":"^2.0.0"},"devDependencies":{"speedometer":"^1.0.0","standard":"^11.0.0","tape":"^4.9.0"},"scripts":{"test":"standard && tape test/*.js","install":"node-gyp rebuild"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/turbo-net.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/turbo-net/issues"},"homepage":"https://github.com/mafintosh/turbo-net","gypfile":true,"gitHead":"9ef9cc12dab8844c75a42e70d0e70bf9f0ac3f41","_id":"turbo-net@1.0.0","_npmVersion":"5.6.0","_nodeVersion":"9.6.1","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"dist":{"shasum":"fc583bbfe47098d8f544d6e38d33ad903ded2270","size":7583,"noattachment":false,"key":"/turbo-net/-/turbo-net-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/turbo-net/download/turbo-net-1.0.0.tgz"},"maintainers":[{"name":"mafintosh","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/turbo-net_1.0.0_1519839648469_0.44665160199126586"},"_hasShrinkwrap":false,"publish_time":1519839648741,"_cnpm_publish_time":1519839648741},"0.0.2":{"name":"turbo-net","version":"0.0.2","main":"index.js","description":"Experimental TCP library","dependencies":{"nan":"^2.5.1","node-gyp-build":"^3.0.0","unordered-set":"^2.0.0"},"devDependencies":{"prettier-bytes":"^1.0.3","speedometer":"^1.0.0","standard":"^8.0.0"},"scripts":{"test":"standard","install":"node-gyp-build"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/turbo-net.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/turbo-net/issues"},"homepage":"https://github.com/mafintosh/turbo-net","gitHead":"fbd54f77453420ebfa317fecd8dbab1aefd76838","_id":"turbo-net@0.0.2","_shasum":"8a8750ac9dbef57d2fd4b7f5146e58658f40c791","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.9.5","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"dist":{"shasum":"8a8750ac9dbef57d2fd4b7f5146e58658f40c791","size":7800,"noattachment":false,"key":"/turbo-net/-/turbo-net-0.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/turbo-net/download/turbo-net-0.0.2.tgz"},"maintainers":[{"name":"mafintosh","email":""}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/turbo-net-0.0.2.tgz_1486664846184_0.27283532125875354"},"directories":{},"publish_time":1486664848089,"_cnpm_publish_time":1486664848089,"_hasShrinkwrap":false},"0.0.1":{"name":"turbo-net","version":"0.0.1","main":"index.js","description":"Experimental TCP library","dependencies":{"nan":"^2.5.1","node-gyp-build":"^3.0.0","unordered-set":"^2.0.0"},"devDependencies":{"prettier-bytes":"^1.0.3","speedometer":"^1.0.0","standard":"^8.0.0"},"scripts":{"test":"standard","install":"node-gyp-build"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/turbo-net.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/turbo-net/issues"},"homepage":"https://github.com/mafintosh/turbo-net","gitHead":"f3c49cd4f96a733d3efd962231d2a6a8c0104523","_id":"turbo-net@0.0.1","_shasum":"d87e66e0738df158df961e6cc356c679a03b8e15","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.9.5","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"dist":{"shasum":"d87e66e0738df158df961e6cc356c679a03b8e15","size":7788,"noattachment":false,"key":"/turbo-net/-/turbo-net-0.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/turbo-net/download/turbo-net-0.0.1.tgz"},"maintainers":[{"name":"mafintosh","email":""}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/turbo-net-0.0.1.tgz_1486654339175_0.15989347477443516"},"directories":{},"publish_time":1486654341056,"_cnpm_publish_time":1486654341056,"_hasShrinkwrap":false},"0.0.0":{"name":"turbo-net","version":"0.0.0","main":"index.js","description":"Experimental TCP library","dependencies":{"node-gyp-build":"^3.0.0","unordered-set":"^2.0.0"},"devDependencies":{"prettier-bytes":"^1.0.3","speedometer":"^1.0.0","standard":"^8.0.0"},"scripts":{"test":"standard","install":"node-gyp-build"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/turbo-net.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/turbo-net/issues"},"homepage":"https://github.com/mafintosh/turbo-net","gitHead":"cdc8cfabd711f0bb29597c480a3986e6efd076c0","_id":"turbo-net@0.0.0","_shasum":"3981ad3cfd06fcf7675000b8a3a1cb9aed57b122","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.9.5","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"dist":{"shasum":"3981ad3cfd06fcf7675000b8a3a1cb9aed57b122","size":7768,"noattachment":false,"key":"/turbo-net/-/turbo-net-0.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/turbo-net/download/turbo-net-0.0.0.tgz"},"maintainers":[{"name":"mafintosh","email":""}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/turbo-net-0.0.0.tgz_1486654135537_0.8578949209768325"},"directories":{},"publish_time":1486654136224,"_cnpm_publish_time":1486654136224,"_hasShrinkwrap":false}},"readme":"# turbo-net\n\nLow level TCP library for Node.js\n\n```\nnpm install turbo-net\n```\n\n[![build status](https://travis-ci.org/mafintosh/turbo-net.svg?branch=master)](https://travis-ci.org/mafintosh/turbo-net)\n[![Build status](https://ci.appveyor.com/api/projects/status/1rbh090naan36163/branch/master?svg=true)](https://ci.appveyor.com/project/mafintosh/turbo-net/branch/master)\n\n## Usage\n\n``` js\nconst turbo = require('turbo-net')\n\n// Echo server that allocates constant memory\n\nconst server = turbo.createServer(function (socket) {\n  socket.read(Buffer.alloc(32 * 1024), function onread (err, buf, read) {\n    if (err) throw err\n    socket.write(buf, read, function (err) {\n      if (err) throw err\n      socket.read(buf, onread)\n    })\n  })\n})\n\nserver.listen(8080, function () {\n  const socket = turbo.connect(8080)\n\n  socket.read(Buffer.alloc(32), function (err, buf, read) {\n    if (err) throw err\n    console.log(buf.toString('utf-8', 0, read))\n  })\n  socket.write(Buffer.from('hello world\\n'))\n})\n```\n\n## Performance\n\nRunning the echo server examples in `./examples` I get the following throughput on my laptop\n\n* echo-classic: 1.3GB/s at ~100MB of ram\n* echo-turbo: 3.4GB/s at ~35MB of ram\n\n## API\n\n#### `server = turbo.createServer([options], [onsocket])`\n\nCreate a new TCP server. Options include:\n\n``` js\n{\n  allowHalfOpen: false // set to true to allow half open TCP connections\n}\n```\n\n#### `server.on('connection', connection)`\n\nEmitted when a new connection is established.\n\n#### `server.on('listening')`\n\nEmitted when the server is listening.\n\n#### `server.connections`\n\nUnordered array containing the current active connections\n\n#### `server.listen(port, [address], [onlistening])`\n\nListen on a port.\n\n#### `server.address()`\n\nSimilar to net.Server.address. Useful if you are listening on port 0,\nto find out which port was picked.\n\n#### `server.close([onclose])`\n\nClose the server.\n\n#### `connection = turbo.connect(port, host, [options])`\n\nConnect to a TCP server. Options include:\n\n``` js\n{\n  allowHalfOpen: false // set to true to allow half open TCP connections\n}\n```\n\n#### `connection.on('connect')`\n\nEmitted when a client connection is fully connected.\n\n#### `connection.on('error', err)`\n\nEmitted when a client fails to connect.\n\n#### `connection.on('close')`\n\nEmitted a connection is fully closed. No other events will be emitted after.\n\n#### `connection.on('finish')`\n\nEmitted when the writable side is fully closed.\n\n#### `connection.on('end')`\n\nEmitted when the readable side is fully closed.\n\n#### `connection.close([callback])`\n\nCloses the connection.\n\n#### `connection.read(buffer, callback)`\n\nRead data from the connection. Data will be read into the buffer you pass.\n\nThe callback is called with `callback(err, buffer, bytesRead)`.\n\nIf `bytesRead` is `0`, then the readable side of the connection has ended.\n\n#### `connection.write(buffer, [length], [callback])`\n\nWrite data to the connection. Optionally you specify how many bytes in the\nbuffer you want to write.\n\nThe callback is called with `callback(err, buffer, length)`.\n\n#### `connection.writev(buffers, [lengths], [callback])`\n\nWrite more than one buffer at once. Optionally you can specify how many bytes in\neach buffer you want to write.\n\nThe callback is called with `callback(err, buffers, lengths)`.\n\n#### `connection.end([callback])`\n\nEnd the writable side of the connection.\n\n## License\n\nMIT\n","_attachments":{},"homepage":"https://github.com/mafintosh/turbo-net","bugs":{"url":"https://github.com/mafintosh/turbo-net/issues"},"license":"MIT"}