public static void CallHandshakeRejected(this HandshakeNegotiatorHooks hooks, NetworkConnection connection) { hooks.OnHandshakeRejected?.Invoke(new HandshakeRejected { Connection = connection }); }
public static void CallHandshakeCompleted(this HandshakeNegotiatorHooks hooks, NetworkConnection connection, Handshake handshake) { hooks.OnHandshakeCompleted?.Invoke(new HandshakeCompleted { Hash = handshake.Hash, Handshake = handshake, Connection = connection }); }
public HandshakeNegotiatorPassive(NetworkPool pool, NetworkConnection connection, HandshakeNegotiatorPassiveContext context, HandshakeNegotiatorHooks hooks) { this.context = context; this.hooks = hooks; this.connection = new HandshakeConnection(pool, connection, hooks); this.credentials = HandshakeCryptography.Generate(); this.keys = new HandshakeKeyContainer(); }
public HandshakeNegotiator Build(HandshakeNegotiatorHooks hooks) { return(new HandshakeNegotiatorInstance(dependencies, hooks)); }
public HandshakeNegotiatorInstance(HandshakeNegotiatorDependencies dependencies, HandshakeNegotiatorHooks hooks) { this.dependencies = dependencies; this.hooks = hooks; }
public HandshakeConnection(NetworkPool pool, NetworkConnection connection, HandshakeNegotiatorHooks hooks) { this.pool = pool; this.connection = connection; this.hooks = hooks; }