Components » StreamSec Snif
componentTsnipAdvancedTLSClient
The tier that takes an EXTERNAL engine, so several clients share one set of trust anchors, one client identity and one suite policy - and pay for building that once instead of once per connection. Leaving TLSServer nil falls back to the process-wide GlobalServer, which is what makes this work with no wiring at all in an application that already has one.
IT NEVER CHANGES THE ENGINE'S ROLE. The engine is the application's and may be accepting connections at the same time, so its ClientOrServer is the application's business - set it to cosClientSide on an engine used only for connecting out. What this tier does do is bring the engine up for client use once (CheckLoaded + TLSSetupClient, the supported route) rather than poking its internals on every connect; see PrepareEngine for why that is the whole of it.
ONE ENGINE, MANY CLIENTS, CONCURRENTLY: each connection gets its own content layer from TLSAddClientSession, and the engine serializes the session list internally, so two clients sharing an engine may hand-shake on two threads. Attaching a client to the engine, re-pointing it and freeing it are serialized against every other client of that engine as well, so clients may be created, pointed at a shared engine and freed on any thread. What is NOT shared is a client instance: one connection at a time, as with the self-owning tier.
DFM NOTE. This tier and TsnipTLSClient publish the same property name with opposite ownership, so changing an existing form's component from one class to the other does not carry the reference across: the self-owning tier's engine is a named child of the client, and a stored "TLSServer = Client1.TLSServer" line cannot resolve against a class that creates no child. It fails quietly - the reference stays nil and this tier falls back to GlobalServer - so re-assign TLSServer after such a change.
Properties
| Name | Declared in |
| AlpnToken | TsnipCustomTLSClient (inherited from TsnipCustomTLSClient) |
| Connection | TsnicClassClient (inherited from TsnicClassClient) |
| HandshakeTimeout | TsnipCustomTLSClient (inherited from TsnipCustomTLSClient) |
| Host | TsnipCustomTLSClient (inherited from TsnipCustomTLSClient) |
| MaxFrameSize | TsnipCustomTLSClient (inherited from TsnipCustomTLSClient) |
| PadRequestsTo | TsnipCustomTLSClient (inherited from TsnipCustomTLSClient) |
| PadResponsesTo | TsnipCustomTLSClient (inherited from TsnipCustomTLSClient) |
| Port | TsnipCustomTLSClient (inherited from TsnipCustomTLSClient) |
| ReadTimeout | TsnipCustomTLSClient (inherited from TsnipCustomTLSClient) |
| RecoveryHeartbeatInterval | TsnipCustomTLSClient (inherited from TsnipCustomTLSClient) |
| RequirePadding | TsnipCustomTLSClient (inherited from TsnipCustomTLSClient) |
| ServerName | TsnipCustomTLSClient (inherited from TsnipCustomTLSClient) |
| Session | TsnicClassClient (inherited from TsnicClassClient) |
| SnifPassword | TsnipCustomTLSClient (inherited from TsnipCustomTLSClient) |
| SnifUsername | TsnipCustomTLSClient (inherited from TsnipCustomTLSClient) |
| TLSServer | TsnipAdvancedTLSClient |
| Username | TsnicClassClient (inherited from TsnicClassClient) |
Events
| Name | Declared in |
| OnConfigureLayer | TsnipCustomTLSClient (inherited from TsnipCustomTLSClient) |
| OnNewPassword | TsnipCustomTLSClient (inherited from TsnipCustomTLSClient) |
| OnOTPCode | TsnipCustomTLSClient (inherited from TsnipCustomTLSClient) |
| OnTransportReady | TsnipCustomTLSClient (inherited from TsnipCustomTLSClient) |
Methods
| Name | Declared in |
| Create | TsnipCustomTLSClient (inherited from TsnipCustomTLSClient) |
| Destroy | TsnipCustomTLSClient (inherited from TsnipCustomTLSClient) |
| HandleRequest | TsnicClassClient (inherited from TsnicClassClient) |
| LoginKAPA | TsnipCustomTLSClient (inherited from TsnipCustomTLSClient) |
| MakeInstance | TsnicClassClient (inherited from TsnicClassClient) |
| RecoverAccount | TsnipCustomTLSClient (inherited from TsnipCustomTLSClient) |
| Start | TsnipCustomTLSClient (inherited from TsnipCustomTLSClient) |
| StartTransport | TsnipCustomTLSClient (inherited from TsnipCustomTLSClient) |
| Stop | TsnipCustomTLSClient (inherited from TsnipCustomTLSClient) |
| SubscribeMediator | TsnicClassClient (inherited from TsnicClassClient) |
| SuggestRequiredUnits | TstBaseComponent (inherited from TstBaseComponent) |
| TryGetConnection | TsnicClassClient (inherited from TsnicClassClient) |