TsgcWebSocketHTTPServerProperties › IOHandlerOptions

IOHandlerOptions Property

Selects the I/O strategy used to service connections: thread-per-connection, IOCP or EPOLL.

Syntax

public TsgcWSIOHandler_Options IOHandlerOptions { get; set; }

Default Value

IOHandler=iohDefault

Remarks

Set IOHandler to one of three modes: iohDefault uses Indy's classic thread-per-connection model — every new connection spawns its own thread (simple but costly at high fan-out); iohIOCP (Windows, Enterprise edition) uses I/O Completion Ports with a shared worker pool, dramatically lowering the per-connection cost; iohEPOLL (Linux, Enterprise edition) uses the epoll event loop for the same benefit on Unix systems. IOCP and EPOLL are not compatible with ThreadPool or QueueOptions. See the feature topics on IOCP and EPOLL for a full capability matrix.

Example


oServer = new TsgcWebSocketHTTPServer();
oServer.IOHandlerOptions.IOHandler = TwsIOHandlerOption.iohIOCP;
oServer.Active = true;

Back to Properties