Contents · Forum Home · StreamSec Tools 4.1.5.363 documentation

methodTsnipTLSServer.AppProtocol

function AppProtocol: iAppProtocol;
Register this with TsmAsyncTLSServer.Protocols.AddProtocol. The same instance is returned every time, so registering with several servers shares this component's one ClassServer - which is normally what you want.

THE COMPONENT CLEANS UP ONLY THE SERVER PROPERTY'S REGISTRATION. It has one Server slot and cannot know about registries it was never told about, so an application that registers this adapter with a SECOND server owns that registration: unregister it with Protocols.RemoveProtocol(x.AppProtocol) before freeing this component. Forgetting is no longer fatal - Destroy detaches the adapter, so a leftover entry refuses connections instead of calling into freed memory - but the port goes on advertising a token that can never be served.

Calling this FREEZES AlpnToken: the adapter reads the token live, so once it has been handed out the token is a registry key.