Пример #1
0
        public bool DoHandshake(Connection c)
        {
            byte[] buffer = this.Build();
            c.SendBytes(ref buffer);

            Packet p = Packet.Read(c);
            if (p == null || !p.GetType().Equals(typeof(PackHandshake)))
                return false;
            this.mlPlayerId = ((PackHandshake)p).PlayerId;
            return true;
        }