예제 #1
0
 protected virtual NetBuffer DecryptMessage( CryptoHostConnection connection, NetBuffer buffer )
 {
     return new NetBuffer(connection.DecryptBuffer(buffer.ReadBytes(buffer.LengthBytes)));
 }
예제 #2
0
        protected override void UserConnected(NetConnection sender)
        {
            CryptoHostConnection connection;
            if (CryptoClients.ContainsKey(sender))
                connection = CryptoClients[sender];
            else
            {
                connection = new CryptoHostConnection();
                CryptoClients.Add(sender, new CryptoHostConnection());
            }
            connection.state = CryptoHostState.InitalConnect;

            // send them the rsa key
            server.SendMessage(RSAKeybuffer, sender, NetChannel.ReliableInOrder1);
        }