示例#1
0
    void SendDeclinedRequest(IPEndPoint iPEndPoint)
    {
        DeclinedPacket packet = new DeclinedPacket();

        packet.payload.reason = "Max clients reached";
        PacketManager.Instance.SendPacketToClient(packet, iPEndPoint);
    }
示例#2
0
    void OnDeclinedRequest(Stream stream, IPEndPoint iPEndPoint)
    {
        if (!NetworkManager.Instance.isServer)
        {
            state      = State.Disconnected;
            clientSalt = serverSalt = -1;

            DeclinedPacket packet = new DeclinedPacket();
            packet.Deserialize(stream);

            Debug.LogError(packet.payload.reason);
        }
    }