|
@@ -15,95 +15,95 @@ namespace Model
|
|
|
public const int ENET_PROTOCOL_MAXIMUM_CHANNEL_COUNT = 255;
|
|
public const int ENET_PROTOCOL_MAXIMUM_CHANNEL_COUNT = 255;
|
|
|
public const int ENET_PROTOCOL_MAXIMUM_PEER_ID = 0xfff;
|
|
public const int ENET_PROTOCOL_MAXIMUM_PEER_ID = 0xfff;
|
|
|
|
|
|
|
|
- [DllImport(LIB)]
|
|
|
|
|
|
|
+ [DllImport(LIB, CallingConvention = CallingConvention.Cdecl)]
|
|
|
internal static extern int enet_address_set_host(ref ENetAddress address, string hostName);
|
|
internal static extern int enet_address_set_host(ref ENetAddress address, string hostName);
|
|
|
|
|
|
|
|
- [DllImport(LIB)]
|
|
|
|
|
|
|
+ [DllImport(LIB, CallingConvention = CallingConvention.Cdecl)]
|
|
|
internal static extern int enet_address_get_host(ref ENetAddress address, StringBuilder hostName, uint nameLength);
|
|
internal static extern int enet_address_get_host(ref ENetAddress address, StringBuilder hostName, uint nameLength);
|
|
|
|
|
|
|
|
- [DllImport(LIB)]
|
|
|
|
|
|
|
+ [DllImport(LIB, CallingConvention = CallingConvention.Cdecl)]
|
|
|
internal static extern int enet_address_get_host_ip(ref ENetAddress address, StringBuilder hostIp, uint ipLength);
|
|
internal static extern int enet_address_get_host_ip(ref ENetAddress address, StringBuilder hostIp, uint ipLength);
|
|
|
|
|
|
|
|
- [DllImport(LIB)]
|
|
|
|
|
|
|
+ [DllImport(LIB, CallingConvention = CallingConvention.Cdecl)]
|
|
|
internal static extern void enet_deinitialize();
|
|
internal static extern void enet_deinitialize();
|
|
|
|
|
|
|
|
- [DllImport(LIB)]
|
|
|
|
|
|
|
+ [DllImport(LIB, CallingConvention = CallingConvention.Cdecl)]
|
|
|
internal static extern int enet_initialize();
|
|
internal static extern int enet_initialize();
|
|
|
|
|
|
|
|
- [DllImport(LIB)]
|
|
|
|
|
|
|
+ [DllImport(LIB, CallingConvention = CallingConvention.Cdecl)]
|
|
|
internal static extern IntPtr enet_host_create(
|
|
internal static extern IntPtr enet_host_create(
|
|
|
ref ENetAddress address, uint peerLimit, uint channelLimit, uint incomingBandwidth, uint outgoingBandwidth);
|
|
ref ENetAddress address, uint peerLimit, uint channelLimit, uint incomingBandwidth, uint outgoingBandwidth);
|
|
|
|
|
|
|
|
- [DllImport(LIB)]
|
|
|
|
|
|
|
+ [DllImport(LIB, CallingConvention = CallingConvention.Cdecl)]
|
|
|
internal static extern IntPtr enet_host_create(IntPtr address, uint peerLimit, uint channelLimit, uint incomingBandwidth, uint outgoingBandwidth);
|
|
internal static extern IntPtr enet_host_create(IntPtr address, uint peerLimit, uint channelLimit, uint incomingBandwidth, uint outgoingBandwidth);
|
|
|
|
|
|
|
|
- [DllImport(LIB)]
|
|
|
|
|
|
|
+ [DllImport(LIB, CallingConvention = CallingConvention.Cdecl)]
|
|
|
internal static extern void enet_host_destroy(IntPtr host);
|
|
internal static extern void enet_host_destroy(IntPtr host);
|
|
|
|
|
|
|
|
- [DllImport(LIB)]
|
|
|
|
|
|
|
+ [DllImport(LIB, CallingConvention = CallingConvention.Cdecl)]
|
|
|
internal static extern IntPtr enet_host_connect(IntPtr host, ref ENetAddress address, uint channelCount, uint data);
|
|
internal static extern IntPtr enet_host_connect(IntPtr host, ref ENetAddress address, uint channelCount, uint data);
|
|
|
|
|
|
|
|
- [DllImport(LIB)]
|
|
|
|
|
|
|
+ [DllImport(LIB, CallingConvention = CallingConvention.Cdecl)]
|
|
|
internal static extern void enet_host_broadcast(IntPtr host, byte channelID, IntPtr packet);
|
|
internal static extern void enet_host_broadcast(IntPtr host, byte channelID, IntPtr packet);
|
|
|
|
|
|
|
|
- [DllImport(LIB)]
|
|
|
|
|
|
|
+ [DllImport(LIB, CallingConvention = CallingConvention.Cdecl)]
|
|
|
internal static extern void enet_host_compress(IntPtr host, IntPtr compressor);
|
|
internal static extern void enet_host_compress(IntPtr host, IntPtr compressor);
|
|
|
|
|
|
|
|
- [DllImport(LIB)]
|
|
|
|
|
|
|
+ [DllImport(LIB, CallingConvention = CallingConvention.Cdecl)]
|
|
|
internal static extern int enet_host_compress_with_range_coder(IntPtr host);
|
|
internal static extern int enet_host_compress_with_range_coder(IntPtr host);
|
|
|
|
|
|
|
|
- [DllImport(LIB)]
|
|
|
|
|
|
|
+ [DllImport(LIB, CallingConvention = CallingConvention.Cdecl)]
|
|
|
internal static extern void enet_host_channel_limit(IntPtr host, uint channelLimit);
|
|
internal static extern void enet_host_channel_limit(IntPtr host, uint channelLimit);
|
|
|
|
|
|
|
|
- [DllImport(LIB)]
|
|
|
|
|
|
|
+ [DllImport(LIB, CallingConvention = CallingConvention.Cdecl)]
|
|
|
internal static extern void enet_host_bandwidth_limit(IntPtr host, uint incomingBandwidth, uint outgoingBandwidth);
|
|
internal static extern void enet_host_bandwidth_limit(IntPtr host, uint incomingBandwidth, uint outgoingBandwidth);
|
|
|
|
|
|
|
|
- [DllImport(LIB)]
|
|
|
|
|
|
|
+ [DllImport(LIB, CallingConvention = CallingConvention.Cdecl)]
|
|
|
internal static extern void enet_host_flush(IntPtr host);
|
|
internal static extern void enet_host_flush(IntPtr host);
|
|
|
|
|
|
|
|
- [DllImport(LIB)]
|
|
|
|
|
|
|
+ [DllImport(LIB, CallingConvention = CallingConvention.Cdecl)]
|
|
|
internal static extern int enet_host_check_events(IntPtr host, ref ENetEvent ev);
|
|
internal static extern int enet_host_check_events(IntPtr host, ref ENetEvent ev);
|
|
|
|
|
|
|
|
- [DllImport(LIB)]
|
|
|
|
|
|
|
+ [DllImport(LIB, CallingConvention = CallingConvention.Cdecl)]
|
|
|
internal static extern int enet_host_service(IntPtr host, IntPtr ev, uint timeout);
|
|
internal static extern int enet_host_service(IntPtr host, IntPtr ev, uint timeout);
|
|
|
|
|
|
|
|
- [DllImport(LIB)]
|
|
|
|
|
|
|
+ [DllImport(LIB, CallingConvention = CallingConvention.Cdecl)]
|
|
|
internal static extern uint enet_time_get();
|
|
internal static extern uint enet_time_get();
|
|
|
|
|
|
|
|
- [DllImport(LIB)]
|
|
|
|
|
|
|
+ [DllImport(LIB, CallingConvention = CallingConvention.Cdecl)]
|
|
|
internal static extern void enet_time_set(uint newTimeBase);
|
|
internal static extern void enet_time_set(uint newTimeBase);
|
|
|
|
|
|
|
|
- [DllImport(LIB)]
|
|
|
|
|
|
|
+ [DllImport(LIB, CallingConvention = CallingConvention.Cdecl)]
|
|
|
internal static extern IntPtr enet_packet_create(byte[] data, uint dataLength, PacketFlags flags);
|
|
internal static extern IntPtr enet_packet_create(byte[] data, uint dataLength, PacketFlags flags);
|
|
|
|
|
|
|
|
- [DllImport(LIB)]
|
|
|
|
|
|
|
+ [DllImport(LIB, CallingConvention = CallingConvention.Cdecl)]
|
|
|
internal static extern void enet_packet_destroy(IntPtr packet);
|
|
internal static extern void enet_packet_destroy(IntPtr packet);
|
|
|
|
|
|
|
|
- [DllImport(LIB)]
|
|
|
|
|
|
|
+ [DllImport(LIB, CallingConvention = CallingConvention.Cdecl)]
|
|
|
internal static extern int enet_packet_resize(IntPtr packet, uint dataLength);
|
|
internal static extern int enet_packet_resize(IntPtr packet, uint dataLength);
|
|
|
|
|
|
|
|
- [DllImport(LIB)]
|
|
|
|
|
|
|
+ [DllImport(LIB, CallingConvention = CallingConvention.Cdecl)]
|
|
|
internal static extern void enet_peer_throttle_configure(IntPtr peer, uint interval, uint acceleration, uint deceleration);
|
|
internal static extern void enet_peer_throttle_configure(IntPtr peer, uint interval, uint acceleration, uint deceleration);
|
|
|
|
|
|
|
|
- [DllImport(LIB)]
|
|
|
|
|
|
|
+ [DllImport(LIB, CallingConvention = CallingConvention.Cdecl)]
|
|
|
internal static extern int enet_peer_send(IntPtr peer, byte channelID, IntPtr packet);
|
|
internal static extern int enet_peer_send(IntPtr peer, byte channelID, IntPtr packet);
|
|
|
|
|
|
|
|
- [DllImport(LIB)]
|
|
|
|
|
|
|
+ [DllImport(LIB, CallingConvention = CallingConvention.Cdecl)]
|
|
|
internal static extern IntPtr enet_peer_receive(IntPtr peer, out byte channelID);
|
|
internal static extern IntPtr enet_peer_receive(IntPtr peer, out byte channelID);
|
|
|
|
|
|
|
|
- [DllImport(LIB)]
|
|
|
|
|
|
|
+ [DllImport(LIB, CallingConvention = CallingConvention.Cdecl)]
|
|
|
internal static extern void enet_peer_reset(IntPtr peer);
|
|
internal static extern void enet_peer_reset(IntPtr peer);
|
|
|
|
|
|
|
|
- [DllImport(LIB)]
|
|
|
|
|
|
|
+ [DllImport(LIB, CallingConvention = CallingConvention.Cdecl)]
|
|
|
internal static extern void enet_peer_ping(IntPtr peer);
|
|
internal static extern void enet_peer_ping(IntPtr peer);
|
|
|
|
|
|
|
|
- [DllImport(LIB)]
|
|
|
|
|
|
|
+ [DllImport(LIB, CallingConvention = CallingConvention.Cdecl)]
|
|
|
internal static extern void enet_peer_disconnect_now(IntPtr peer, uint data);
|
|
internal static extern void enet_peer_disconnect_now(IntPtr peer, uint data);
|
|
|
|
|
|
|
|
- [DllImport(LIB)]
|
|
|
|
|
|
|
+ [DllImport(LIB, CallingConvention = CallingConvention.Cdecl)]
|
|
|
internal static extern void enet_peer_disconnect(IntPtr peer, uint data);
|
|
internal static extern void enet_peer_disconnect(IntPtr peer, uint data);
|
|
|
|
|
|
|
|
- [DllImport(LIB)]
|
|
|
|
|
|
|
+ [DllImport(LIB, CallingConvention = CallingConvention.Cdecl)]
|
|
|
internal static extern void enet_peer_disconnect_later(IntPtr peer, uint data);
|
|
internal static extern void enet_peer_disconnect_later(IntPtr peer, uint data);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|