Exemplo n.º 1
0
 public PacketTransporter(PacketType packetType, Packet packet, int offset, int size, AsyncTcpClient tcpClient, int dataType = -1, Packet dataPacket = null)
 {
     m_packetType  = packetType;
     m_packet      = packet;
     m_offset      = offset;
     m_size        = size;
     m_TcpClient   = tcpClient;
     m_dataPacket  = dataPacket;
     m_DataType    = dataType;
     m_callBackObj = tcpClient.m_callBackObj;
 }
Exemplo n.º 2
0
        private void onConnected(IAsyncResult result)
        {
            AsyncTcpClient tcpclient = result.AsyncState as AsyncTcpClient;

            try { tcpclient.m_client.Client.EndConnect(result); }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message + " >" + ex.StackTrace);
                tcpclient.m_timeOutEvent.SetEvent();
                return;
            }
            tcpclient.m_timeOutEvent.SetEvent();

            return;
        }
Exemplo n.º 3
0
 public AsyncTcpClient(AsyncTcpClient b) : base(b)
 {
     m_clientOps = b.m_clientOps;
 }