TsgcWebSocketServer_HTTPAPI › Events › OnUnknownProtocol
Not currently supported by the HTTP API server; declared for API compatibility with TsgcWebSocketServer.
property OnUnknownProtocol: TsgcWSUnknownProtocolEvent;
// TsgcWSUnknownProtocolEvent = procedure(Connection: TsgcWSConnection; var Accept: Boolean) of object
—
OnUnknownProtocol is declared on the HTTP API server for source compatibility with TsgcWebSocketServer but it is not currently fired: the HTTP.SYS kernel driver dispatches incoming requests by URL reservation rather than by sniffing the first bytes, so unknown protocols are simply rejected by HTTP.SYS before the component can raise the event. To accept raw TCP clients use the classic TsgcWebSocketServer; this event is retained here to keep user code portable between the two servers.
procedure OnUnknownProtocol(Connection: TsgcWSConnection; var Accept: Boolean);
begin
// not invoked by the HTTP API server; provided for API compatibility
Accept := True;
end;