예제 #1
0
 public AsyncSendBufferManager(int bufferSize)
 {
     m_dynamicBufferManager = new DynamicBufferManager(bufferSize);
     m_sendBufferList = new List<SendBufferPacket>();
     m_sendBufferPacket.Offset = 0;
     m_sendBufferPacket.Count = 0;
 }
예제 #2
0
 public AsyncSocketUserToken(int asyncReceiveBufferSize)
 {
     m_connectSocket = null;
     m_asyncSocketInvokeElement = null;
     m_receiveEventArgs = new SocketAsyncEventArgs();
     m_receiveEventArgs.UserToken = this;
     m_asyncReceiveBuffer = new byte[asyncReceiveBufferSize];
     m_receiveEventArgs.SetBuffer(m_asyncReceiveBuffer, 0, m_asyncReceiveBuffer.Length);
     m_sendEventArgs = new SocketAsyncEventArgs();
     m_sendEventArgs.UserToken = this;
     m_receiveBuffer = new DynamicBufferManager(ProtocolConst.InitBufferSize);
     m_sendBuffer = new AsyncSendBufferManager(ProtocolConst.InitBufferSize); ;
 }