public SocketReceivePeer() { mWaitSendBuffer = new QueueArraySegment <byte> (64, ServerConfig.nMaxBufferSize); mNetPackage = new NetPackage(); mParseStreamList = new CircularBuffer <byte> (2 * ServerConfig.nMaxBufferSize); mLogicFuncDic = new Dictionary <ushort, Action <NetPackage> > (); }
public SocketPeer_Select() { mWaitSendBuffer = new QueueArraySegment <byte> (64, ServerConfig.nMaxBufferSize); mNetPackage = new NetPackage(); mParseStreamList = new CircularBuffer <byte> (2 * ServerConfig.nMaxBufferSize); mBindReceiveNetPackage = new DataBind <NetPackage> (new NetPackage()); mBindReceiveNetPackage.addDataBind(NetSystem_Select.mEventSystem.DeSerialize); }
public void Test2() { QueueArraySegment <byte> mBuffer = new QueueArraySegment <byte> (1, 10); for (int i = 0; i < 100; i++) { byte[] aaa = new byte[] { 1, 2, 4, 5, 6, 7 }; mBuffer.WriteFrom(aaa, 0, aaa.Length); } DebugSystem.Log(mBuffer.ToString()); }
public NetSendSystem(SocketSystem socketSys) { this.mSocketSystem = socketSys; mWaitSendBuffer = new QueueArraySegment <byte> (64, ClientConfig.nMaxBufferSize); mNetPackage = new NetPackage(); }