Exemple #1
0
        private void HandleAcceptMessage(NetworkMessage msg)
        {
            MsgAccept accept = msg as MsgAccept;

            PlayerList.LocalPlayerID = accept.PlayerID;

            NetClientAccepted();
            UDPRequestSent = true;
            // start UDP Link
            NetClient.ConnectToUDP();
            NetClient.SendMessage(false, new MsgUDPLinkRequest(PlayerList.LocalPlayerID));
        }
Exemple #2
0
        private void SendAccept(ServerPlayer player)
        {
            Logger.Log1("Accept Player " + player.PlayerID + ":" + player.Callsign);

            MsgAccept accept = new MsgAccept();

            accept.PlayerID = player.PlayerID;

            player.SendMessage(accept);

            PlayerAccepted?.Invoke(this, player);
            Promote(player);
        }
Exemple #3
0
        private static void HandleAcceptMessage(NetworkMessage msg)
        {
            MsgAccept accept = msg as MsgAccept;

            WriteLine("Received Accept Message PlayerID is " + accept.PlayerID.ToString());

            PlayerID = accept.PlayerID;

            UDPRequestSent = true;
            // start UDP Link
            client.ConnectToUDP();
            client.SendMessage(false, new MsgUDPLinkRequest(PlayerID));
            WriteLine("Sent UDP Link request via UDP");
        }