Check out example codes for "open tcp socket c#". It will help you in understanding the concepts better.

Code Example 1

Socket s = new Socket(AddressFamily.InterNetwork,   
   SocketType.Stream, ProtocolType.Tcp);

Learn ReactJs, React Native from akashmittal.com