C# Listen TCP Port

c#, tcp, tcplistener

Solution

Assuming you're working in .NET, look at TcpClient and TcpListener.

Here's the MSDN documentation on TcpListener: https://msdn.microsoft.com/en-us/library/system.net.sockets.tcplistener(v=vs.110).aspx

Problem

I want to listen a TCP port. The scenario: SIP server, and client-program. The SIP server may use port 5010 to listen and establish multiple connections. The client connects from his pc to the server via port 5010. When a packet is received on that port, an event must be triggered on the client PC. Any ideas where to start?

Original source