Any books/samples/articles about multi-threaded socket communication...

W

WTH

with a C# client (and/or server, but server not important)?

I've got a scalable high speed (uses completion ports) C++ TCP/IP
communication server but I'd like to write a C# client that other C# devs at
our company can just drop in and use (it's an event and message passing
system.)

I'm sure, as most things C#/.Net, it's relatively simple, but if I can
discover some caveats the easy way rather than the hard way I'm always up
for that ;).

Technical minutae: The client must be able to transmit and receive
simultaneously (asynchronous) and ideally (but not necessarily) I'd like to
be able to share the socket amongst threads (like you can do with a raw
socket but not an MFC socket.)

Thanks,

WTH
 
N

Nicholas Paldino [.NET/C# MVP]

WTH,

The Socket class in .NET doesn't have any thread-affinity, so you should
be able to pass it among threads easily. Beyond the synchronization issues
(which arise from using any class on multiple threads), you should be able
to do what you want rather easily.

Hope this helps.
 
W

WTH

WTH,

The Socket class in .NET doesn't have any thread-affinity, so you
should be able to pass it among threads easily. Beyond the
synchronization issues (which arise from using any class on multiple
threads), you should be able to do what you want rather easily.

Hope this helps.

I'm really starting to love .Net/C#/CLR... ;)

Thanks, it's all still a little new to a long time *nix/Win32 C++
X11R6/Motif/Qt/MFC developer. "It CAN'T be this easy..." LOL.

WTH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top