Ejemplo n.º 1
0
 public static void CallHandshakeRejected(this HandshakeNegotiatorHooks hooks, NetworkConnection connection)
 {
     hooks.OnHandshakeRejected?.Invoke(new HandshakeRejected
     {
         Connection = connection
     });
 }
Ejemplo n.º 2
0
 public static void CallHandshakeCompleted(this HandshakeNegotiatorHooks hooks, NetworkConnection connection, Handshake handshake)
 {
     hooks.OnHandshakeCompleted?.Invoke(new HandshakeCompleted
     {
         Hash       = handshake.Hash,
         Handshake  = handshake,
         Connection = connection
     });
 }
Ejemplo n.º 3
0
        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();
        }
Ejemplo n.º 4
0
 public HandshakeNegotiator Build(HandshakeNegotiatorHooks hooks)
 {
     return(new HandshakeNegotiatorInstance(dependencies, hooks));
 }
Ejemplo n.º 5
0
 public HandshakeNegotiatorInstance(HandshakeNegotiatorDependencies dependencies, HandshakeNegotiatorHooks hooks)
 {
     this.dependencies = dependencies;
     this.hooks        = hooks;
 }
Ejemplo n.º 6
0
 public HandshakeConnection(NetworkPool pool, NetworkConnection connection, HandshakeNegotiatorHooks hooks)
 {
     this.pool       = pool;
     this.connection = connection;
     this.hooks      = hooks;
 }