public Task<bool> DisconnectAsync(uint data = 0) { NativeMethods.enet_peer_disconnect(this.peerPtr, data); var tcs = new TaskCompletionSource<bool>(); this.PeerEvent.Disconnect += e => tcs.TrySetResult(true); return tcs.Task; }