TNonblockingServer

class TNonblockingServer : TServer {}

Constructors

this
this(TProcessor processor, ushort port, TTransportFactory transportFactory, TProtocolFactory protocolFactory, TaskPool taskPool)
this
this(TProcessorFactory processorFactory, ushort port, TTransportFactory transportFactory, TProtocolFactory protocolFactory, TaskPool taskPool)
this
this(TProcessor processor, ushort port, TTransportFactory inputTransportFactory, TTransportFactory outputTransportFactory, TProtocolFactory inputProtocolFactory, TProtocolFactory outputProtocolFactory, TaskPool taskPool)
this
this(TProcessorFactory processorFactory, ushort port, TTransportFactory inputTransportFactory, TTransportFactory outputTransportFactory, TProtocolFactory inputProtocolFactory, TProtocolFactory outputProtocolFactory, TaskPool taskPool)

Members

Functions

ipv6Only
void ipv6Only(bool value)

Whether to listen on IPv6 only, if IPv6 support is detected

numActiveProcessors
size_t numActiveProcessors()

Return count of number of connections which are currently processing.

numConnections
size_t numConnections()

Returns the number of currently active connections, i.e. open sockets.

numIOThreads
size_t numIOThreads()
Undocumented in source. Be warned that the author may not have intended to support it.
numIOThreads
void numIOThreads(size_t value)
Undocumented in source. Be warned that the author may not have intended to support it.
numIdleConnections
size_t numIdleConnections()

Returns the number of connection objects allocated, but not in use.

overloadHysteresis
double overloadHysteresis()
void overloadHysteresis(double value)

Hysteresis for overload state.

serve
void serve(TCancellation cancellation)
Undocumented in source. Be warned that the author may not have intended to support it.
taskPool
TaskPool taskPool()
void taskPool(TaskPool pool)

The task pool to use for processing requests. If null, no additional threads are used and request are processed »inline«.

Manifest constants

BIND_RETRY_DELAY
enum BIND_RETRY_DELAY;

Duration between bind() retries.

BIND_RETRY_LIMIT
enum BIND_RETRY_LIMIT;

Number of bind() retries.

DEFAULT_NUM_IO_THREADS
enum DEFAULT_NUM_IO_THREADS;
Undocumented in source.
DEFAULT_OVERLOAD_ACTION
enum DEFAULT_OVERLOAD_ACTION;

The action which will be taken on overload.

DEFAULT_OVERLOAD_HYSTERESIS
enum DEFAULT_OVERLOAD_HYSTERESIS;

Hysteresis for overload state.

Variables

DEFAULT_CONNECTION_STACK_LIMIT
enum size_t DEFAULT_CONNECTION_STACK_LIMIT;

Limit for how many Connection objects to cache.

DEFAULT_IDLE_READ_BUFFER_LIMIT
enum size_t DEFAULT_IDLE_READ_BUFFER_LIMIT;

Max read buffer size for an idle Connection. When we place an idle Connection into connectionStack_ or on every resizeBufferEveryN_ calls, we will free the buffer (such that it will be reinitialized by the next received frame) if it has exceeded this limit. 0 disables this check.

DEFAULT_IDLE_WRITE_BUFFER_LIMIT
enum size_t DEFAULT_IDLE_WRITE_BUFFER_LIMIT;

Max write buffer size for an idle connection. When we place an idle Connection into connectionStack_ or on every resizeBufferEveryN_ calls, we ensure that its write buffer is <= to this size; otherwise we replace it with a new one of writeBufferDefaultSize_ bytes to ensure that idle connections don't hog memory. 0 disables this check.

DEFAULT_MAX_ACTIVE_PROCESSORS
enum size_t DEFAULT_MAX_ACTIVE_PROCESSORS;

Limit for number of connections processing or waiting to process

DEFAULT_MAX_CONNECTIONS
enum size_t DEFAULT_MAX_CONNECTIONS;

Limit for number of open connections before server goes into overload state.

DEFAULT_MAX_FRAME_SIZE
enum uint DEFAULT_MAX_FRAME_SIZE;

Maximum frame size, in bytes.

DEFAULT_RESIZE_BUFFER_EVERY_N
enum uint DEFAULT_RESIZE_BUFFER_EVERY_N;

Every N calls we check the buffer size limits on a connected Connection. 0 disables (i.e. the checks are only done when a connection closes).

DEFAULT_WRITE_BUFFER_DEFAULT_SIZE
enum size_t DEFAULT_WRITE_BUFFER_DEFAULT_SIZE;

The write buffer is initialized (and when idleWriteBufferLimit_ is checked and found to be exceeded, reinitialized) to this size.

connectionStackLimit
size_t connectionStackLimit;

Limit for how many Connection objects to cache.

idleReadBufferLimit
size_t idleReadBufferLimit;

Max read buffer size for an idle Connection. When we place an idle Connection into connectionStack_ or on every resizeBufferEveryN_ calls, we will free the buffer (such that it will be reinitialized by the next received frame) if it has exceeded this limit. 0 disables this check.

idleWriteBufferLimit
size_t idleWriteBufferLimit;

Max write buffer size for an idle connection. When we place an idle Connection into connectionStack_ or on every resizeBufferEveryN_ calls, we ensure that its write buffer is <= to this size; otherwise we replace it with a new one of writeBufferDefaultSize_ bytes to ensure that idle connections don't hog memory. 0 disables this check.

maxActiveProcessors
size_t maxActiveProcessors;

Limit for number of connections processing or waiting to process

maxConnections
size_t maxConnections;

Limit for number of open connections before server goes into overload state.

maxFrameSize
uint maxFrameSize;

Maximum frame size, in bytes.

overloadAction
TOverloadAction overloadAction;

The action which will be taken on overload.

resizeBufferEveryN
uint resizeBufferEveryN;

Every N calls we check the buffer size limits on a connected Connection. 0 disables (i.e. the checks are only done when a connection closes).

writeBufferDefaultSize
size_t writeBufferDefaultSize;

The write buffer is initialized (and when idleWriteBufferLimit_ is checked and found to be exceeded, reinitialized) to this size.

Inherited Members

From TServer

serve
void serve(TCancellation cancellation)

Starts serving.

eventHandler
TServerEventHandler eventHandler;

The server event handler to notify. Null by default.

processorFactory_
TProcessorFactory processorFactory_;
Undocumented in source.
serverTransport_
TServerTransport serverTransport_;
Undocumented in source.
inputTransportFactory_
TTransportFactory inputTransportFactory_;
Undocumented in source.
outputTransportFactory_
TTransportFactory outputTransportFactory_;
Undocumented in source.
inputProtocolFactory_
TProtocolFactory inputProtocolFactory_;
Undocumented in source.
outputProtocolFactory_
TProtocolFactory outputProtocolFactory_;
Undocumented in source.
processorFactory
TProcessorFactory processorFactory [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
serverTransport
TServerTransport serverTransport [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
inputTransportFactory
TTransportFactory inputTransportFactory [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
outputTransportFactory
TTransportFactory outputTransportFactory [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
inputProtocolFactory
TProtocolFactory inputProtocolFactory [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
outputProtocolFactory
TProtocolFactory outputProtocolFactory [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.

Meta