Example #1
0
 /// <summary>
 /// Send the message to the client.
 ///
 /// /!\ USED ONLY IN NETWORKIO WORKERS /!\
 /// </summary>
 /// <param name="aData">The data to send to the client.</param>
 public void _Send(ref Byte[] aData)
 {
     lock (mCipher)
     {
         mCipher.Encrypt(ref aData, aData.Length);
         mSocket.Send(aData);
     }
 }
Example #2
0
        /// <summary>
        /// Send the message to the client.
        /// </summary>
        /// <param name="aMsg">The message to send to the client.</param>
        public void Send(Msg aMsg)
        {
            Byte[] msg = (Byte[])aMsg;
            Program.NetworkMonitor.Send(msg.Length);

            lock (mCipher)
            {
                mCipher.Encrypt(ref msg, msg.Length);
                mSocket.Send(msg);
            }
        }