Home:ALL Converter>C# - System.Net Socket.Listen Backlog

C# - System.Net Socket.Listen Backlog

Ask Time:2011-10-22T22:16:02         Author:JMK

Json Formatter

Ok, I have connected to an IP address using the following code:

        IPAddress myIpAddress = IPAddress.Parse("10.10.15.200");

        IPEndPoint ip = new IPEndPoint(myIpAddress, 5001);
        Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
        socket.Connect(ip);

I now want to listen to the socket. When I type socket.Listen, intellisense says I need to enter a backlog number, what does this mean?

Also, once I am listening to the socket, how do I capture the content of what I am 'listening' to.

Thanks

John

Author:JMK,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/7860161/c-sharp-system-net-socket-listen-backlog
yy