private CreateAndSend ( PacketProperty property ) : void | ||
property | PacketProperty | |
리턴 | void |
/// <summary> /// Disconnect peer from server /// </summary> /// <param name="peer">peer to disconnect</param> public void DisconnectPeer(NetPeer peer) { if (peer != null && _peers.ContainsKey(peer.EndPoint)) { peer.CreateAndSend(PacketProperty.Disconnect); var netEvent = CreateEvent(NetEventType.Disconnect); netEvent.Peer = peer; netEvent.DisconnectReason = DisconnectReason.DisconnectPeerCalled; EnqueueEvent(netEvent); RemovePeer(peer); } }
/// <summary> /// Disconnect peer from server /// </summary> /// <param name="peer">peer to disconnect</param> public void DisconnectPeer(NetPeer peer) { if (peer != null && _peers.ContainsKey(peer.EndPoint)) { peer.CreateAndSend(PacketProperty.Disconnect); var netEvent = CreateEvent(NetEventType.Disconnect); netEvent.Peer = peer; netEvent.DisconnectReason = DisconnectReason.DisconnectPeerCalled; EnqueueEvent(netEvent); RemovePeer(peer); } }
/// <summary> /// Disconnect peer from server /// </summary> /// <param name="peer">peer to disconnect</param> public void DisconnectPeer(NetPeer peer) { if (peer != null && _peers.ContainsKey(peer.EndPoint)) { peer.CreateAndSend(PacketProperty.Disconnect); var netEvent = CreateEvent(NetEventType.Disconnect); netEvent.Peer = peer; netEvent.AdditionalInfo = "Disconnect peer called"; EnqueueEvent(netEvent); RemovePeer(peer); } }