Пример #1
0
 public void Send(byte[] bytes)
 {
     try
     {
         if (arc4_0 != null)
         {
             arc4_0.encrypt(bytes);
         }
         concurrentQueue_0.Enqueue(bytes);
     }
     catch
     {
     }
 }
Пример #2
0
 public void Send(byte[] bytes)
 {
     try
     {
         if (networkStream_0.CanWrite)
         {
             if (arc4_0 != null)
             {
                 arc4_0.encrypt(bytes);
             }
             networkStream_0.Write(bytes, 0, bytes.Length);
         }
     }
     catch
     {
     }
 }
Пример #3
0
 public void Send(byte[] data)
 {
     if (arc4_0 != null)
     {
         arc4_0.encrypt(data);
     }
     if (socketAsyncEventArgs_1 == null)
     {
         socketAsyncEventArgs_1 = new SocketAsyncEventArgs
         {
             RemoteEndPoint = ipendPoint_0
         };
         socketAsyncEventArgs_1.Completed += method_2;
         socketAsyncEventArgs_1.UserToken  = proxySocket_0;
     }
     socketAsyncEventArgs_1.SetBuffer(data, 0, data.Length);
     if (!proxySocket_0.SendAsync(socketAsyncEventArgs_1))
     {
         method_3(socketAsyncEventArgs_1);
     }
 }
Пример #4
0
        public void Send(byte[] sendBuffer, bool issync = false)
        {
            MySocketEventArgs mySocketEventArgs = method_0();

            try
            {
                if (arc4_0 != null)
                {
                    arc4_0.encrypt(sendBuffer);
                }
                mySocketEventArgs.IsUsing = true;
                mySocketEventArgs.SetBuffer(sendBuffer, 0, sendBuffer.Length);
                if (clientSocket != null && !clientSocket.SendAsync(mySocketEventArgs))
                {
                    method_2(mySocketEventArgs);
                }
            }
            catch
            {
            }
        }
Пример #5
0
 public bool send(byte[] bytes)
 {
     try
     {
         if (!client.Connected && !client.IsOnline())
         {
             throw new Exception("连接断开");
         }
         if (networkStream_0.CanWrite)
         {
             if (arc4_0 != null)
             {
                 arc4_0.encrypt(bytes);
             }
             networkStream_0.Write(bytes, 0, bytes.Length);
             return(true);
         }
         return(false);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }