.NET makes this stuff pretty straight forward. Server side, use a TcpListener to accept incoming connections from the client. Once accepted, which gives you a TcpClient, the ususal practice is to create a new thread and pass it the TcpClient and let it do its server side stuff. If the connection is likely to be brief, use the ThreadPool. On the client, just use a TcpClient to connect to the server. Generally, the connection stays open until either end closes it, or it *may* get closed due to inactivity timeouts - not sure. You can attach a NetworkStream to the TcpClient at both ends, so you just end up with a duplex stream you can read and write to. Cassini is a little web server from the early days of .NET which allowed people to develop ASP.NET applications. Have a look at the source of that for some patterns. http://blogs.msdn.com/dmitryr/archive/2005/09/27/474534.aspx[^]
Regards, Rob Philpott.