Exemple #1
0
 void OnCommandAccepted(UdpStream buffer)
 {
     if (IsClient)
     {
         if (CheckState(UdpConnectionState.Connecting))
         {
             if (buffer.CanRead(8) && buffer.ReadByte(8) == UdpEvent.INTERNAL_COMMAND_HASOBJECT)
             {
                 serializer.Unpack(buffer, ref hailMessage);
             }
             ChangeState(UdpConnectionState.Connected);
         }
     }
     else
     {
         ConnectionError(UdpConnectionError.IncorrectCommand);
     }
 }
Exemple #2
0
 void OnCommandAccepted(UdpStream buffer)
 {
     if (IsClient) {
         if (CheckState(UdpConnectionState.Connecting)) {
             if (buffer.CanRead(8) && buffer.ReadByte(8) == UdpEvent.INTERNAL_COMMAND_HASOBJECT)
                 serializer.Unpack(buffer, ref hailMessage);
             ChangeState(UdpConnectionState.Connected);
         }
     } else {
         ConnectionError(UdpConnectionError.IncorrectCommand);
     }
 }