TsgcWebSocketServer_HTTPAPI › Properties › Options
Bundles miscellaneous server behaviour flags: fragment handling, write timeouts, HTTP test pages and UTF-8 validation.
property Options: TsgcWSOptionsServer read FOptions write SetOptions;
FragmentedMessages=frgOnlyBuffer, HTMLFiles=True, JavascriptFiles=True, WriteTimeOut=0
FragmentedMessages controls how fragmented frames are delivered: frgOnlyBuffer (default) buffers the message until complete and raises OnMessage/OnBinary; frgOnlyFragmented raises OnFragmented for every fragment; frgAll raises both. HTMLFiles and JavascriptFiles let the server serve the built-in browser test pages and JavaScript client. RaiseDisconnectExceptions throws when a disconnection is caused by a protocol error. WriteTimeOut (milliseconds) only applies when Asynchronous is False: if a send takes longer than this value the request is cancelled and the connection is closed; 0 disables the check. A background thread scans the outstanding writes every WriteTimeoutInterval seconds (minimum 5, default 10). ValidateUTF8 rejects text messages containing invalid UTF-8. Software holds the HTTP Server header value.
oServer := TsgcWebSocketServer_HTTPAPI.Create(nil);
oServer.Options.FragmentedMessages := frgOnlyBuffer;
oServer.Options.ValidateUTF8 := true;
oServer.Options.HTMLFiles := false;
oServer.Active := true;