CreateSession() public method

public CreateSession ( byte cookieValue ) : Session
cookieValue byte
return Session
Exemplo n.º 1
0
        public void Run()
        {
            if (DH == null)
            {
                DH = RtmfpUtils.BeginDiffieHellman(ref Nonce);
                return;
            }
            // Compute Diffie-Hellman secret
            SharedSecret = DH.CreateSharedKey(InitiatorKey);
            // Compute Keys
            RtmfpUtils.ComputeAsymetricKeys(SharedSecret, InitiatorNonce, Nonce, out DecryptKey, out EncryptKey);
            var pSession = _handshake?.CreateSession(Value);

            if (pSession != null)
            {
                pSession.Peer.UserState = this;
            }
        }