public static void Welcome(Packet packet)
        {
            byte   myId = packet.ReadByte();
            string msg  = packet.ReadString();

            Log($"Message from server: {msg}");
            Client.Instance.myId = myId;

            ClientSend.WelcomeReceived();

            Client.Instance.udp.Connect(((IPEndPoint)Client.Instance.tcp.socket.Client.LocalEndPoint).Port);
        }
Beispiel #2
0
        public static void Welcome(Packet packet)
        {
            byte   myId = packet.ReadByte();
            string msg  = packet.ReadString();

            Log($"Message from server: {msg}");
            Client.Instance.myId = myId;

            // Ideally you would do this on skin change.
            // For now we only do it when joining the server.
            //var hashes = GetTextureHashes();

            ClientSend.WelcomeReceived(/*hashes, */ Client.Instance.isHost);

            Client.Instance.udp.Connect(((IPEndPoint)Client.Instance.tcp.socket.Client.LocalEndPoint).Port);
        }