Fog Creek Software
Discussion Board




Welcome! and rules

Joel on Software

Async TCPlistener

Hey, i'm trying to figure out this network programming (heavy web/db background).  I think i've 'graduated' to asyncronous programming, and I figured out to how read data from a TCP stream asyncronously, but I can't figure out how to asyncronously retrieve new TCP connections.

Should I do it the old fashioned way (loop, sleep, read)? Is there an async way to do this?  thanks in advance for any help/comments

Anon
Tuesday, September 24, 2002

Check out the TCPListener help in MSDN.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconnon-blockingserversocketexample.asp

or

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemRuntimeRemotingRemotingConfigurationClassRegisterWellKnownServiceTypeTopic.asp

Should point you in the right direction, I am using the bottom type at the minute to set up a service to listen for requests etc ...

HTH

Steve

Steve Brett
Wednesday, September 25, 2002

Here's another example from Dr. Dobbs:
http://www.ddj.com/ftp/2002/2002_09/tcpecho.txt

They implemented a echo server using Async TCPlistener in C#.

Ian Stallings
Thursday, September 26, 2002

*  Recent Topics

*  Fog Creek Home