TsgcWebSocketServer › Properties › IOHandlerOptions
Selects the I/O strategy used to service connections: thread-per-connection, IOCP or EPOLL.
property IOHandlerOptions: TsgcWSIOHandler_Options read FIOHandlerOptions write SetIOHandlerOptions;
IOHandler=iohDefault
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.
oServer := TsgcWebSocketServer.Create(nil);
oServer.IOHandlerOptions.IOHandler := iohIOCP;
oServer.Active := true;