public void Ping() { NativeMethods.EnetPeerPing(this.peerPtr); }
public void ConfigureThrottle(uint interval, uint acceleration, uint deceleration) { NativeMethods.EnetPeerThrottleConfigure(this.peerPtr, interval, acceleration, deceleration); }
public void DisconnectNow(uint data) { NativeMethods.EnetPeerDisconnectNow(this.peerPtr, data); // EnetPeerDisconnect会reset Peer,这里设置为0,防止再次Dispose this.PeerPtr = IntPtr.Zero; }