public void Pack(UdpBitStream buffer, UdpSocket socket) { buffer.WriteUShort(PadSequence(ObjSequence), 16); buffer.WriteUShort(PadSequence(AckSequence), 16); buffer.WriteULong(AckHistory, socket.Config.AckRedundancy); if (socket.Config.CalculateNetworkPing) { buffer.WriteUShort(AckTime, 16); } if (socket.Config.WritePacketBitSize) { buffer.WriteUShort(BitSize, 16); } }
public void Pack(UdpBitStream buffer, UdpSocket socket) { buffer.WriteUShort(PadSequence(ObjSequence), 16); buffer.WriteUShort(PadSequence(AckSequence), 16); buffer.WriteULong(AckHistory, socket.Config.AckRedundancy); if (socket.Config.CalculateNetworkPing) { buffer.WriteUShort(AckTime, 16); } if (socket.Config.WritePacketBitSize) { buffer.WriteUShort(BitSize, 16); } }
public static void WriteCheck(ref UdpBitStream bitStream) { bitStream.WriteUShort(TEST_VAL, TEST_BITS_SIZE); }