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 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(); }