示例#1
0
 public void DisconnectAll()
 {
     for (int i = 0; i < connections.Length; i++)
     {
         if (connections[i] != null)
         {
             ENet.DisconnectPeerNow(connections[i].Peer, 0);
         }
     }
 }
示例#2
0
        public void Disconnect(uint connectionId)
        {
            if (connectionId > connections.Length)
            {
                Debug.Error(config.Name, ": Disconnect Id: ", connectionId.ToString(), " -- Out of connection array bounds");
                return;
            }

            ENet.DisconnectPeerNow(connections[connectionId].Peer, 0);
        }
示例#3
0
 ///<summary>
 /// Disconnects from a remote connection unreliably with an id message
 /// </summary>
 public void DisconnectForcefully(uint id)
 {
     ENet.DisconnectPeerNow(Peer, id);
 }
示例#4
0
 ///<summary>
 /// Disconnects from a remote connection unreliably
 /// </summary>
 public void DisconnectForcefully()
 {
     ENet.DisconnectPeerNow(Peer, 0);
 }