C # ==> High-performance server?

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?

+6
sockets nio
source share
4 answers

Yes, 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).

+11
source share

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.

+2
source share

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.

+1
source share

There are various ways to use regular sockets. Asynchronous usage generally scales better.

0
source share

All Articles