Exemplo n.º 1
0
 /// <summary>
 /// Remove data holder from token and reset properties to their default values.
 /// </summary>
 /// <remarks>
 /// This method is called before pushing token into list of free EventArgs.
 /// </remarks>
 public void Cleanup()
 {
     BufferOffsetCurrent    = BufferOffset;
     ReceivedBytesToProcess = 0;
     MessageToSendBytes     = null;
     MessageBytesToProcess  = 0;
     MessageBytesProcessed  = 0;
     MessageBytes           = null;
     HeadBytesProcessed     = 0;
     BodyBytesProcessed     = 0;
     BodyBytesLength        = 0;
     HeadProcessError       = null;
     LastOperationDate      = null;
     DataHolder             = null;
 }
Exemplo n.º 2
0
 public SocketDataEventArgs(SocketServerEventType status, DataHolder holder, SocketError error = SocketError.Success)
 {
     _Status = status;
     _Holder = holder;
     _Error  = error;
 }