示例#1
0
 protected void onReceive(ReturnType type)
 {
     ClientCommand.Command command = CommandPool.GetCommand((int)CommandIndex);
     if (command != null)
     {
         SubArray <byte> data = new SubArray <byte> {
             Start = (int)(byte)type
         };
         command.OnReceive(ref data);
     }
 }
示例#2
0
 protected void onReceive()
 {
     ClientCommand.Command command = CommandPool.GetCommand((int)CommandIndex);
     if (command != null)
     {
         SubArray <byte> data = new SubArray <byte> {
             Array = ReceiveBuffer.Buffer, Start = ReceiveBuffer.StartIndex + receiveIndex, Length = dataSize
         };
         command.OnReceive(ref data);
     }
 }
示例#3
0
 internal void OnReceive(ref SubBuffer.PoolBufferFull buffer)
 {
     ClientCommand.Command command = CommandPool.GetCommand((int)CommandIndex);
     if (command == null)
     {
         buffer.Free();
     }
     else
     {
         SubArray <byte> data = new SubArray <byte> {
             Array = buffer.Buffer, Start = buffer.StartIndex, Length = dataSize
         };
         try
         {
             command.OnReceive(ref data);
         }
         finally { buffer.Free(); }
     }
 }