Exemplo n.º 1
0
 public Task<bool> DisconnectLaterAsync(uint data = 0)
 {
     NativeMethods.enet_peer_disconnect_later(this.peerPtr, data);
     var tcs = new TaskCompletionSource<bool>();
     this.PeerEvent.Disconnect += e => tcs.TrySetResult(true);
     return tcs.Task;
 }