Async TCPClient / TCP Listener

  • Thread starter Thread starter Sagaert Johan
  • Start date Start date
S

Sagaert Johan

Can someone point me to a good implementation of Async Sockets in c# ?

So far i did not find a lot usefull info on this item.

For the TcpListener, an example that supports multiple incoming connections
would be very usefull to get me started.


Johan
 
Can someone point me to a good implementation of Async Sockets in c# ?

So far i did not find a lot usefull info on this item.

For the TcpListener, an example that supports multiple incoming
connections
would be very usefull to get me started.

I found this quite useful:

http://snipurl.com/4el8

Let me know how you get on. I'm writing something similar, except that my
central machine is a client connecting to multiple servers. The data I am
polling for is important, so I want to ensure that errors on some servers
do not obstruct data flow from others, and the IOCP model seems to be
useful for this.
 
Sagaert said:
Can someone point me to a good implementation of Async Sockets in c# ?

So far i did not find a lot usefull info on this item.

For the TcpListener, an example that supports multiple incoming
connections would be very usefull to get me started.

TcpListener does not offer async I/O support -- you need to use Sockets in
order to do that.

You can do async I/O (BeginRead(), BeginWrite(), etc.) on the NetworkStream
returned by TcpClient's GetStream() method.

Cheers,
 
Back
Top