I know that in java, when you want to create a high-performance server, you use nio instead of a regular socket. So is there such a thing for C # to create high-performance servers?
Yes, SocketAsyncEventArgs :
SocketAsyncEventArgs
The SocketAsyncEventArgs class is part of a set of enhancements for the System.Net.Sockets.Socket class, which provides an alternative asynchronous template that can be used by the applicationβs specialized high-performance socket. This class was specifically designed for network server applications requiring high performance. An application can use the extended asynchronous template exclusively or only in targeted hot areas (for example, when receiving large amounts of data).
System.Net.Sockets.Socket
You can use asynchronous sockets. If this is not enough, you can always check Network Direct SPI , part of the HPC SDC. Note that Network Direct does require a hardware vendor.
Network Direct SPI
SocketAsyncEventArgs uses Windows I / O completion ports, which makes it fast. It is asynchronous, which makes it scalable. The really significant deal with SocketAsyncEventArgs is the I / O completion ports.
See http://www.codeproject.com/KB/cs/socketasynceventargs.aspx for using SocketAsyncEventArgs.
There are various ways to use regular sockets. Asynchronous usage generally scales better.