Exemple #1
0
        public WebSocketConnector(IPacketFormat packetFormat, IPacketHandlerManager packetHandlerManager) : base(packetFormat, packetHandlerManager)
        {
            mSocket              = null;
            mNetStream           = new NetStream(INetConnector.MAX_SOCKET_BUFFER_SIZE * 2);
            tempReadPacketLength = 0;
            tempReadPacketType   = 0;
            tempReadPacketData   = null;

            mSendThread = new AsyncThread(SendLogic);
            mSendThread.Start();
        }
        public WebSocketConnector(IPacketFormat packetFormat, IPacketHandlerManager packetHandlerManager)
            : base(packetFormat, packetHandlerManager)
        {
            mSocket = null;
            mNetStream = new NetStream(INetConnector.MAX_SOCKET_BUFFER_SIZE * 2);
            tempReadPacketLength = 0;
            tempReadPacketType = 0;
            tempReadPacketData = null;

            mSendThread = new AsyncThread(SendLogic);
            mSendThread.Start();
        }
Exemple #3
0
        public UDPConnector(IPacketFormat packetFormat, IPacketHandlerManager packetHandlerManager) : base(packetFormat, packetHandlerManager)
        {
            mSocket              = null;
            mRemoteEndPoint      = null;
            mNetStream           = new NetStream(INetConnector.MAX_SOCKET_BUFFER_SIZE * 2);
            tempReadPacketLength = 0;
            tempReadPacketType   = 0;
            tempReadPacketData   = null;

            mReadCompleteCallback = new AsyncCallback(ReadComplete);
            mSendCompleteCallback = new AsyncCallback(SendComplete);

            mSendThread = new AsyncThread(SendLogic);
            mSendThread.Start();
        }