public static ChallengeResponse Deserialize(IInOctetStream stream) { var myNonce = stream.ReadUint32(); var serverNonce = stream.ReadUint32(); return(new ChallengeResponse(myNonce, serverNonce)); }
public static ConnectResponse Deserialize(IInOctetStream stream) { var myNonce = stream.ReadUint32(); var serverNonce = stream.ReadUint32(); var connectionId = stream.ReadUint16(); return(new ConnectResponse(myNonce, connectionId, serverNonce)); }
public static Info Deserialize(IInOctetStream stream) { var packetSequenceId = stream.ReadUint8(); var receivedByRemoteSequenceId = stream.ReadUint8(); var receiveMask = stream.ReadUint32(); var header = new Header(new SequenceId(receivedByRemoteSequenceId), new ReceiveMask(receiveMask)); var info = new Info { PacketId = new SequenceId(packetSequenceId), Header = header }; return(info); }