ExtendedParameters is an optional parameter in
Network.AcceptAsync, which may be used to adjust the listener according to your needs.
Code:using (var listener = Network.AcceptAsync(new IPEndPoint(IPAddress.Any, 80), OnAccept,
new ExtendedParameters {Backlog=1024}))
{
...
}
ExtendedParameters Properties
int BufferSize - Defines buffer size for read operations
int MinimumPreparedConnections - Defines minimum amount of connections in the pool at any time.
int MaximumTotalConnections - Allows to limit number of total connections in order to keep the system stable.
int DeltaConnections - Defines how many connections should be prepared when they are required.
int Backlog - Defines socket backlog parameter.
bool Optimized - Allows to optimize accept operation by waiting for the first data to arrive
If ExtendedParameters are not specified then default values are used:
int BufferSize = 8192 //8kbytes
int MinimumPreparedConnections = 1024int MaximumTotalConnections = Int16.MaxValueint DeltaConnections = 256int Backlog = 1024bool Optimized = false //don't wait for data, return immediately