Interface ISubscriptionAcceptor
The engine's side of the transport seam: it turns a link into a connection that speaks the protocol.
public interface ISubscriptionAcceptor
Remarks
Implemented by the engine, called by a transport. It is the only way a transport reaches replication, and it is deliberately one method: everything a connection needs afterwards — the handshake, admission, the session, the send loop, ingress — is behind the ISubscriptionConnection it hands back.
Methods
Accept(ISubscriptionLink, in LinkInfo)
Adopts one connection.
ISubscriptionConnection Accept(ISubscriptionLink link, in LinkInfo info)
Parameters
linkISubscriptionLinkThe transport's link, already usable for sending and closing.
infoLinkInfoWhat the transport knows about the peer.
Returns
- ISubscriptionConnection
The connection to deliver messages to, or null when the engine declines it outright — replication is not running, or the runtime is stopping. A null means the transport closes the link itself; nothing was admitted, so there is nothing to tell the client about.
Remarks
It returns before the client has said anything. The connection starts out waiting for HELLO and closes itself with
HelloTimeout if one does not arrive within HelloTimeoutMs,
so a transport never has to run a connect deadline of its own.
A refusal is not a null. A client the application's admission hook rejects, or one that does not fit the session table, is
admitted far enough to be told why: it gets a KICK with a close code and then the link is closed. That happens inside the connection, after
this call.