Functions | |
| ENetHost * | enet_host_create (const ENetAddress *address, size_t peerCount, enet_uint32 incomingBandwidth, enet_uint32 outgoingBandwidth) |
| Creates a host for communicating to peers. | |
| void | enet_host_destroy (ENetHost *host) |
| Destroys the host and all resources associated with it. | |
| ENetPeer * | enet_host_connect (ENetHost *host, const ENetAddress *address, size_t channelCount) |
| Initiates a connection to a foreign host. | |
| void | enet_host_broadcast (ENetHost *host, enet_uint8 channelID, ENetPacket *packet) |
| Queues a packet to be sent to all peers associated with the host. | |
| void | enet_host_bandwidth_limit (ENetHost *host, enet_uint32 incomingBandwidth, enet_uint32 outgoingBandwidth) |
| Adjusts the bandwidth limits of a host. | |
| void | enet_host_bandwidth_throttle (ENetHost *host) |
| void | enet_host_flush (ENetHost *host) |
| Sends any queued packets on the host specified to its designated peers. | |
| int | enet_host_check_events (ENetHost *host, ENetEvent *event) |
| Checks for any queued events on the host and dispatches one if available. | |
| int | enet_host_service (ENetHost *host, ENetEvent *event, enet_uint32 timeout) |
| Waits for events on the host specified and shuttles packets between the host and its peers. | |
| void enet_host_bandwidth_limit | ( | ENetHost * | host, | |
| enet_uint32 | incomingBandwidth, | |||
| enet_uint32 | outgoingBandwidth | |||
| ) |
| host | host to adjust | |
| incomingBandwidth | new incoming bandwidth | |
| outgoingBandwidth | new outgoing bandwidth |
| void enet_host_broadcast | ( | ENetHost * | host, | |
| enet_uint8 | channelID, | |||
| ENetPacket * | packet | |||
| ) |
| host | host on which to broadcast the packet | |
| channelID | channel on which to broadcast | |
| packet | packet to broadcast |
References enet_packet_destroy(), and enet_peer_send().
| host | host to check for events | |
| event | an event structure where event details will be placed if available |
| > | 0 if an event was dispatched | |
| 0 | if no events are available | |
| < | 0 on failure |
References ENET_EVENT_TYPE_NONE.
| ENetPeer* enet_host_connect | ( | ENetHost * | host, | |
| const ENetAddress * | address, | |||
| size_t | channelCount | |||
| ) |
| host | host seeking the connection | |
| address | destination for the connection | |
| channelCount | number of channels to allocate |
References ENET_HOST_TO_NET_16, and ENET_HOST_TO_NET_32.
| ENetHost* enet_host_create | ( | const ENetAddress * | address, | |
| size_t | peerCount, | |||
| enet_uint32 | incomingBandwidth, | |||
| enet_uint32 | outgoingBandwidth | |||
| ) |
| address | the address at which other peers may connect to this host. If NULL, then no peers may connect to the host. | |
| peerCount | the maximum number of peers that should be allocated for the host. | |
| incomingBandwidth | downstream bandwidth of the host in bytes/second; if 0, ENet will assume unlimited bandwidth. | |
| outgoingBandwidth | upstream bandwidth of the host in bytes/second; if 0, ENet will assume unlimited bandwidth. |
References ENET_HOST_ANY, and enet_peer_reset().
| void enet_host_destroy | ( | ENetHost * | host | ) |
| host | pointer to the host to destroy |
References enet_peer_reset().
| void enet_host_flush | ( | ENetHost * | host | ) |
| host | host to flush |
References enet_time_get().
Referenced by enet_peer_disconnect(), and enet_peer_disconnect_now().
| int enet_host_service | ( | ENetHost * | host, | |
| ENetEvent * | event, | |||
| enet_uint32 | timeout | |||
| ) |
| host | host to service | |
| event | an event structure where event details will be placed if one occurs if event == NULL then no events will be delivered | |
| timeout | number of milliseconds that ENet should wait for events |
| > | 0 if an event occurred within the specified time limit | |
| 0 | if no event occurred | |
| < | 0 on failure |
References ENET_EVENT_TYPE_NONE, and enet_time_get().
1.6.1