Closed PatrickSCLin closed 9 years ago
definitely possible and shouldn't be too hard. I'll probably take a stab at it in the near future.
thanks bro, I'm just new to React Native, it's awesome, but I can't use TCP socket from JS, I found a component, WebSocket which in React Native, but it looks like only allow to using for http and ws.
Can I use utp in *.ios.js ?
sure, .ios.js is just a naming convention, it's really just .js
you should probably experiment a bit with React Native itself first before playing with networking. It's a different environment from node.js, and takes a bit of acclimation to the tooling, limitations, patterns, etc.
.io.js is running on iOS side right ?
I thought utp only work on Node.JS ?
my goal is building an app which able to access data via telnet (port 23 or ssh) protocol
would like to using tcp socket in .ios.js for some reasons
React Native uses JavaScriptCore, so the JS environment is pretty similar to being in a browser. Modules like this one attempt to make it more like a node.js environment. tcp is on the todo list :)
I just tried to make a lib "RCTTCPSocket" , it's able to connect now, https://github.com/PatrickSCLin/RCTTCPSocket will try to implement return the received data as byte-array later, thanks for your help :)
cool! I will be keeping an eye on it :)
On Fri, Aug 7, 2015 at 5:14 AM, PatrickSCLIn notifications@github.com wrote:
I just tried to make a lib "RCTTCPSocket" , it's able to connect now, https://github.com/PatrickSCLin/RCTTCPSocket will try to implement return the received data as byte-array later, thanks for your help :)
— Reply to this email directly or view it on GitHub https://github.com/tradle/react-native-udp/issues/7#issuecomment-128649435 .
HI, is possible to make a the other lib of tcp ? like GCDAsyncSocket?