Check out example codes for "comment envoyer un socket C#". It will help you in understanding the concepts better.

Code Example 1

// Establish the local endpoint for the socket.
    IPHostEntry ipHost = Dns.GetHostEntry(Dns.GetHostName());
    IPAddress  ipAddr = ipHost.AddressList[0];
    IPEndPoint ipEndPoint = new IPEndPoint(ipAddr, 11000);

    // Create a TCP socket.
    Socket client = new Socket(AddressFamily.InterNetwork,
            SocketType.Stream, ProtocolType.Tcp);

    // Connect the socket to the remote endpoint.

    // There is a text file test.txt located in the root directory.
    string fileName = "C:\\test.txt";

    // Send file fileName to remote device
    Console.WriteLine("Sending {0} to the host.", fileName);

    // Release the socket.

Learn ReactJs, React Native from