> Hi,
>
[quoted text clipped - 3 lines]
> would like to write good server. (I afraid do huge number of threads..)
> Which class for connection should I use ? (for server and client)
Personally, I'd just go ahead and use the Socket class. But, if for some
reason you find it easier to understand TCP as a Stream instance, or
otherwise want to use the minor additional features found in the TcpClient
and/or UdpClient classes, those would be appropriate as well.
Either way, you will have available to you the usual .NET asynchronous
pattern (methods named "Begin..." and "End..."), which is what you should
use rather than dedicating a thread for each connection. That will give
you a maintainable, efficient solution.
Pete