public void DisconnectNow(uint data) { CheckCreated(); Native.enet_peer_disconnect_now(nativePeer, data); }
public void PingInterval(uint interval) { CheckCreated(); Native.enet_peer_ping_interval(nativePeer, interval); }
public void Timeout(uint timeoutLimit, uint timeoutMinimum, uint timeoutMaximum) { CheckCreated(); Native.enet_peer_timeout(nativePeer, timeoutLimit, timeoutMinimum, timeoutMaximum); }
public void ConfigureThrottle(uint interval, uint acceleration, uint deceleration, uint threshold) { CheckCreated(); Native.enet_peer_throttle_configure(nativePeer, interval, acceleration, deceleration, threshold); }
public void Ping() { CheckCreated(); Native.enet_peer_ping(nativePeer); }
public Peer(Native.ENetPeer* peer) { _peer = peer; }
public static bool Initialize(Callbacks inits) { return(Native.enet_initialize_with_callbacks(version, inits.NativeData) == 0); }
public void PreventConnections(bool state) { CheckCreated(); Native.enet_host_prevent_connections(nativeHost, (byte)(state ? 1 : 0)); }
public void SetBandwidthLimit(uint incomingBandwidth, uint outgoingBandwidth) { CheckCreated(); Native.enet_host_bandwidth_limit(nativeHost, incomingBandwidth, outgoingBandwidth); }
public void SetFreeCallback(PacketFreeCallback callback) { CheckCreated(); Native.enet_packet_set_free_callback(nativePacket, Marshal.GetFunctionPointerForDelegate(callback)); }
public void EnableCompression() { CheckCreated(); Native.enet_host_enable_compression(nativeHost); }
public void SetFreeCallback(IntPtr callback) { CheckCreated(); Native.enet_packet_set_free_callback(nativePacket, callback); }
public static void Deinitialize() { Native.enet_deinitialize(); }
public bool Equals(Address address) { return(Type == address.Type && Port == address.Port && Native.memcmp(GetHostBytes(), address.GetHostBytes())); }
public void DisconnectLater(uint data) { CheckCreated(); Native.enet_peer_disconnect_later(nativePeer, data); }
public void Flush() { CheckCreated(); Native.enet_host_flush(nativeHost); }
public void Reset() { CheckCreated(); Native.enet_peer_reset(nativePeer); }
internal Peer(IntPtr peer) { nativePeer = peer; nativeID = nativePeer != IntPtr.Zero ? Native.enet_peer_get_id(nativePeer) : 0; }
public Packet(Native.ENetPacket* packet) { _packet = packet; }
public static bool Initialize() { return(Native.enet_initialize() == 0); }