Ejemplo n.º 1
0
        /**
         * Packet: 0x8C
         * Length: 11 bytes
         *
         * Sends acknowledge play server
         */
        public static void SendPlayServerAck(this NetState ns, ServerInfo si, int authId)
        {
            if (ns == null || !ns.GetSendBuffer(out var buffer))
            {
                return;
            }

            var writer = new CircularBufferWriter(buffer);

            writer.Write((byte)0x8C); // Packet ID

            writer.WriteLE(si.RawAddress);
            writer.Write((short)si.Address.Port);
            writer.Write(authId);

            ns.Send(ref buffer, writer.Position);
        }