{"_id":"@anthonyhigagrab/react-native-tcp","_rev":"1-dd24c871bd6463d9b162a112ef510d77","name":"@anthonyhigagrab/react-native-tcp","description":"node's net API for react-native","dist-tags":{"latest":"3.2.2"},"versions":{"3.2.2":{"name":"@anthonyhigagrab/react-native-tcp","version":"3.2.2","description":"node's net API for react-native","main":"TcpSockets.js","scripts":{"start":"exit 1"},"browser":{"net":"./TcpSockets.js"},"repository":{"type":"git","url":"git+https://github.com/anthonyhigagrab/react-native-tcp.git"},"keywords":["react-component","reactnative","react-native","net","tcp","sockets","ios","android"],"author":{"name":"Andy Prock","email":"aprock@protonmail.com"},"license":"MIT","bugs":{"url":"https://github.com/anthonyhigagrab/react-native-tcp/issues"},"homepage":"https://github.com/anthonyhigagrab/react-native-tcp","peerDependencies":{"react-native":">=0.40.0"},"dependencies":{"base64-js":"0.0.8","buffer":"^5.0.0","events":"^1.0.2","ip-regex":"^1.0.3","process":"^0.11.9","stream":"0.0.2","stream-browserify":"2.0.1","util":"^0.10.3"},"devDependencies":{"babel-eslint":"^4.1.6","eslint-plugin-react":"^3.11.3"},"gitHead":"115077afc9ef070ac4679a16485746ff5f7ab61a","_id":"@anthonyhigagrab/react-native-tcp@3.2.2","_npmVersion":"5.0.3","_nodeVersion":"8.1.0","_npmUser":{"name":"anthonyhigagrab","email":"Anthony.Higa@grabtaxi.com"},"dist":{"integrity":"sha512-Vu3OXXT3F2Lum7av97kIwxv4TFniN2+NUjv3Epd5A4sxCBnXbkezhh6neC+QKXKR8ctqa8nPTAE0e3eMx4rEXA==","shasum":"c82b37b5a8a7f0d3e8e57c83abb9f2ce67ad0a36","tarball":"https://registry.npmjs.org/@anthonyhigagrab/react-native-tcp/-/react-native-tcp-3.2.2.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDc9gxYsPBvDbW/DkNB6R3CKrl9tQHLa4QDWmr7zdzsuAIhAJVOGbuTH43VE5x2P307NHgxgnEIQucby2iB90wCGeRW"}]},"maintainers":[{"name":"anthonyhigagrab","email":"Anthony.Higa@grabtaxi.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-tcp-3.2.2.tgz_1497648880897_0.26058898610062897"}}},"readme":"# TCP in React Native\n\nnode's [net](https://nodejs.org/api/net.html) API in React Native\n\nThis module is used by [Peel](http://www.peel.com/)\n\n## Install\n\n* Create a new react-native project. [Check react-native getting started](http://facebook.github.io/react-native/docs/getting-started.html#content)\n\n* In your project dir:\n\n```\nnpm install react-native-tcp --save\n```\n\n__Note for iOS:__ If your react-native version < 0.40 install with this tag instead:\n```\nnpm install react-native-tcp@3.1.0 --save\n```\n\n## Link in the native dependency\n\n```\nreact-native link react-native-tcp\n```\n\n## Additional dependencies\n\n### Due to limitations in the react-native packager, streams need to be hacked in with [rn-nodeify](https://www.npmjs.com/package/rn-nodeify)\n\n1. install rn-nodeify as a dev-dependency\n``` npm install --save-dev rn-nodeify ```\n2. run rn-nodeify manually\n``` rn-nodeify --install stream,process,util --hack ```\n3. optionally you can add this as a postinstall script\n``` \"postinstall\": \"rn-nodeify --install stream,process,util --hack\" ```\n\n## Usage\n\n### package.json\n\n_only if you want to write require('net') in your javascript_\n\n```json\n{\n  \"browser\": {\n    \"net\": \"react-native-tcp\"\n  }\n}\n```\n\n### JS\n\n_see/run [index.ios.js/index.android.js](examples/rctsockets) for a complete example, but basically it's just like net_\n\n```js\nvar net = require('net');\n// OR, if not shimming via package.json \"browser\" field:\n// var net = require('react-native-tcp')\n\nvar server = net.createServer(function(socket) {\n  socket.write('excellent!');\n}).listen(12345);\n\nvar client = net.createConnection(12345);\n\nclient.on('error', function(error) {\n  console.log(error)\n});\n\nclient.on('data', function(data) {\n  console.log('message was received', data)\n});\n```\n\n### TODO\n\nadd select tests from node's tests for net\n\n## Contributors\n\n[Andy Prock](https://github.com/aprock)  \n\nPR's welcome!\n\n\n\n_originally forked from [react-native-tcp](https://github.com/PeelTechnologies/react-native-tcp)_\n\n_originally forked from [react-native-udp](https://github.com/tradle/react-native-udp)_\n\n","maintainers":[{"name":"anthonyhigagrab","email":"Anthony.Higa@grabtaxi.com"}],"time":{"modified":"2022-04-04T14:21:43.817Z","created":"2017-06-16T21:34:41.119Z","3.2.2":"2017-06-16T21:34:41.119Z"},"homepage":"https://github.com/anthonyhigagrab/react-native-tcp","keywords":["react-component","reactnative","react-native","net","tcp","sockets","ios","android"],"repository":{"type":"git","url":"git+https://github.com/anthonyhigagrab/react-native-tcp.git"},"author":{"name":"Andy Prock","email":"aprock@protonmail.com"},"bugs":{"url":"https://github.com/anthonyhigagrab/react-native-tcp/issues"},"license":"MIT","readmeFilename":"README.md"}