Use TCP socket in React Native?

PatrickSCLin picture PatrickSCLin · Aug 7, 2015 · Viewed 7.7k times · Source

I want to create a TCP socket in React Native, connect to a telnet server with port of 23.

I found there has 'RCTWebSocket', but it seems only support http, https, ws, wss protocols, and always occurred error when remote response.

Is there a way to use TCP Socket which not only for http, ws protocols ?

Answer

noooooooob picture noooooooob · Sep 2, 2015

You could try native objective c tcp socket with a js interface. Look for "extension " in the react native github page.