TsgcWebSocketServer_HTTPAPI › Properties › ReadBufferSize
Size in bytes of the receive buffer allocated per pending overlapped read against the http.sys request queue.
public int ReadBufferSize { get; set; }
16384 (16 KB)
Controls the size of the buffer allocated for each HttpReceiveHttpRequest / HttpReceiveRequestEntityBody call. The default of 16 KB is aligned with the MSDN HP sample and fits the common case of HTTP headers and small WebSocket frames. Raise the value if you expect most requests to carry large headers or if you push very large WebSocket frames and want to reduce the number of fragmented reads. Lower it if you have a high number of pre-posted receives (FineTune.OperatingMode=ompHighPerf) and want to reduce the reserved memory footprint (each pre-posted receive holds one buffer until it completes).
oServer = new TsgcWebSocketServer_HTTPAPI();
oServer.Host = "127.0.0.1";
oServer.Port = 80;
oServer.ReadBufferSize = 32768;
oServer.Active = true;