Socket Connection RRS feed

  • Question

  • I have an application running where i receive events. I want to connect to the port 1666 and receive those event. Please guide me how i can accomplish that?


    Monday, March 16, 2015 6:35 AM


  • As sockets are based on client/server architecture, this application is composed of a server and a client. The server will reserve a port number. Then it will listen to any upcoming client. The client then will attempt to connect to the server. When the connection succeeds, it will be possible to exchange text messages. When finished, the connection will be closed.

    This example shows how to send and receive data via TCP/IP using Socket in .NET Framework. There are methods Socket.Send and Socket.Receive.
    http://www.csharp-examples.net/socket-send-receive/ .

    http://www.codeproject.com/Articles/463947/Working-with-Sockets-in-Csharp .

    • Edited by LoveMyWork123 Thursday, March 26, 2015 10:35 AM
    • Proposed as answer by LoveMyWork123 Thursday, March 26, 2015 10:35 AM
    • Marked as answer by Shawn Zhao Monday, March 30, 2015 7:50 AM
    Wednesday, March 18, 2015 10:37 AM