socketasynceventargs

20 Receives per second with SocketAsyncEventArgs

大憨熊 提交于 2019-12-04 19:06:15
问题 A TCP Server is developed using SocketAsyncEventArgs and it's async methods as a Windows Service. I have these 2 line of code at the beginning of Main: ThreadPool.SetMaxThreads(15000, 30000); ThreadPool.SetMinThreads(10000, 20000); And both return true (returned values are logged). Now 2000 to 3000 clients start to send messages to this server and it starts to accept connections (I count the number of connections and it is as expected - There is a connection pool). Thread count of the server

TcpListener vs SocketAsyncEventArgs

我的梦境 提交于 2019-12-01 06:51:11
Is there a valid reason to not use TcpListener for implementing a high performance/high throughput TCP server instead of SocketAsyncEventArgs ? I've already implemented this high performance/high throughput TCP server using SocketAsyncEventArgs went through all sort of headaches to handling those pinned buffers using a big pre-allocated byte array and pools of SocketAsyncEventArgs for accepting and receiving, putting together using some low level stuff and shiny smart code with some TPL Data Flow and some Rx and it works perfectly; almost text book in this endeavor - actually I've learnt more

C# SocketAsyncEventArgs handling receive and send data

本小妞迷上赌 提交于 2019-11-30 13:23:25
I am trying to understand the 'SocketAsyncEventArgs' class in C#. http://msdn.microsoft.com/en-us/library/system.net.sockets.socketasynceventargs.aspx I am following this tutorial: http://www.codeproject.com/Articles/83102/C-SocketAsyncEventArgs-High-Performance-Socket-Cod Now I am stuck into how I exactly should process data with my server. What I am trying to do is use a SocketAsyncEventArgs for a connected client with an allocated Buffer space of 512 bytes in the BufferManager. Then what I want to do is to decode the byte[] data into my own custom class (ClientPacket) which holds the byte[]

C# SocketAsyncEventArgs handling receive and send data

帅比萌擦擦* 提交于 2019-11-29 19:09:35
问题 I am trying to understand the 'SocketAsyncEventArgs' class in C#. http://msdn.microsoft.com/en-us/library/system.net.sockets.socketasynceventargs.aspx I am following this tutorial: http://www.codeproject.com/Articles/83102/C-SocketAsyncEventArgs-High-Performance-Socket-Cod Now I am stuck into how I exactly should process data with my server. What I am trying to do is use a SocketAsyncEventArgs for a connected client with an allocated Buffer space of 512 bytes in the BufferManager. Then what I