public static string Deserialize(IInOctetStream stream) { var myNonce = stream.ReadUint8(); var characters = stream.ReadOctets(myNonce); return(Encoding.UTF8.GetString(characters)); }
void ReadConnectionPacket(IInOctetStream stream, long nowMs) { var packetId = HandleTend(stream, nowMs); var count = stream.RemainingOctetCount; var payload = stream.ReadOctets(count); incomingPacketBuffer.AddPacket(packetId, payload); }
public static CustomConnectPayload Deserialize(IInOctetStream stream) { var octetCount = stream.ReadUint8(); var octets = stream.ReadOctets(octetCount); return(new CustomConnectPayload { Payload = octets }); }