Share via


SocketTransportOptions Class

Definition

Options for socket based transports.

public ref class SocketTransportOptions
public class SocketTransportOptions
type SocketTransportOptions = class
Public Class SocketTransportOptions
Inheritance
SocketTransportOptions

Constructors

SocketTransportOptions()

Properties

Backlog

The maximum length of the pending connection queue.

CreateBoundListenSocket

A function used to create a new Socket to listen with. If not set, CreateDefaultBoundListenSocket(EndPoint) is used.

IOQueueCount

The number of I/O queues used to process requests. Set to 0 to directly schedule I/O to the ThreadPool.

MaxReadBufferSize

Gets or sets the maximum unconsumed incoming bytes the transport will buffer.

A value of null or 0 disables backpressure entirely allowing unlimited buffering. Unlimited server buffering is a security risk given untrusted clients.

MaxWriteBufferSize

Gets or sets the maximum outgoing bytes the transport will buffer before applying write backpressure.

A value of null or 0 disables backpressure entirely allowing unlimited buffering. Unlimited server buffering is a security risk given untrusted clients.

NoDelay

Set to false to enable Nagle's algorithm for all connections.

UnsafePreferInlineScheduling

Inline application and transport continuations instead of dispatching to the threadpool.

WaitForDataBeforeAllocatingBuffer

Wait until there is data available to allocate a buffer. Setting this to false can increase throughput at the cost of increased memory usage.

Methods

CreateDefaultBoundListenSocket(EndPoint)

Creates a default instance of Socket for the given EndPoint that can be used by a connection listener to listen for inbound requests. Bind(EndPoint) is called by this method.

Applies to