mgravell / Pipelines.Sockets.Unofficial

.NET managed sockets wrapper using the new "Pipelines" API
Other
416 stars 54 forks source link

proposal: add option to enable tunning socket listen backlog #29

Closed patricksuo closed 5 years ago

patricksuo commented 5 years ago
--- a/src/Pipelines.Sockets.Unofficial/SocketServer.cs
+++ b/src/Pipelines.Sockets.Unofficial/SocketServer.cs
 using System.IO.Pipelines;
 using System.Net;
@@ -22,6 +22,7 @@ namespace Pipelines.Sockets.Unofficial
             AddressFamily addressFamily = AddressFamily.InterNetwork,
             SocketType socketType = SocketType.Stream,
             ProtocolType protocolType = ProtocolType.Tcp,
+            int listenBacklog = 20,
             PipeOptions sendOptions = null, PipeOptions receiveOptions = null)
         {
             if (_listener != null) Throw.InvalidOperation("Server is already running");
Salty-Sailor commented 5 years ago

:+1:

mgravell commented 5 years ago

adding cross-reference: https://github.com/mgravell/Pipelines.Sockets.Unofficial/pull/30

mgravell commented 5 years ago

as mentioned in the PR feedback: fine with the concept, but needs to be done in a binary-compatible way; specifics added in PR discussion.

mgravell commented 5 years ago

available in anything from 2.0.11