Orxonox  0.0.5 Codename: Arcturus
Macros | Functions | Variables
protocol.c File Reference

ENet protocol functions. More...

#include <stdio.h>
#include <string.h>
#include "enet/utility.h"
#include "enet/time.h"
#include "enet/enet.h"

Macros

#define ENET_BUILDING_LIB   1
 

Functions

ENetHostAddress enet_address_map4 (enet_uint32 address)
 Maps an IPv4 Address to an IPv6 address. More...
 
ENetAddressFamily enet_get_address_family (const ENetAddress *address)
 Returns the Address family of an (IPv4-mapped) IPv6 address. More...
 
int enet_host_check_events (ENetHost *host, ENetEvent *event)
 Checks for any queued events on the host and dispatches one if available. More...
 
void enet_host_flush (ENetHost *host)
 Sends any queued packets on the host specified to its designated peers. More...
 
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. More...
 
static int enet_protocol_check_timeouts (ENetHost *host, ENetPeer *peer, ENetEvent *event)
 
size_t enet_protocol_command_size (enet_uint8 commandNumber)
 
static int enet_protocol_dispatch_incoming_commands (ENetHost *host, ENetEvent *event)
 
static void enet_protocol_dispatch_state (ENetHost *host, ENetPeer *peer, ENetPeerState state)
 
static int enet_protocol_handle_acknowledge (ENetHost *host, ENetEvent *event, ENetPeer *peer, const ENetProtocol *command)
 
static int enet_protocol_handle_bandwidth_limit (ENetHost *host, ENetPeer *peer, const ENetProtocol *command)
 
static ENetPeerenet_protocol_handle_connect (ENetHost *host, ENetProtocolHeader *header, ENetProtocol *command)
 
static int enet_protocol_handle_disconnect (ENetHost *host, ENetPeer *peer, const ENetProtocol *command)
 
static int enet_protocol_handle_incoming_commands (ENetHost *host, ENetEvent *event)
 
static int enet_protocol_handle_ping (ENetHost *host, ENetPeer *peer, const ENetProtocol *command)
 
static int enet_protocol_handle_send_fragment (ENetHost *host, ENetPeer *peer, const ENetProtocol *command, enet_uint8 **currentData)
 
static int enet_protocol_handle_send_reliable (ENetHost *host, ENetPeer *peer, const ENetProtocol *command, enet_uint8 **currentData)
 
static int enet_protocol_handle_send_unreliable (ENetHost *host, ENetPeer *peer, const ENetProtocol *command, enet_uint8 **currentData)
 
static int enet_protocol_handle_send_unsequenced (ENetHost *host, ENetPeer *peer, const ENetProtocol *command, enet_uint8 **currentData)
 
static int enet_protocol_handle_throttle_configure (ENetHost *host, ENetPeer *peer, const ENetProtocol *command)
 
static int enet_protocol_handle_verify_connect (ENetHost *host, ENetEvent *event, ENetPeer *peer, const ENetProtocol *command)
 
static void enet_protocol_notify_connect (ENetHost *host, ENetPeer *peer, ENetEvent *event)
 
static void enet_protocol_notify_disconnect (ENetHost *host, ENetPeer *peer, ENetEvent *event)
 
static int enet_protocol_receive_incoming_commands (ENetHost *host, ENetEvent *event, ENetAddressFamily family)
 
static ENetProtocolCommand enet_protocol_remove_sent_reliable_command (ENetPeer *peer, enet_uint16 reliableSequenceNumber, enet_uint8 channelID)
 
static void enet_protocol_remove_sent_unreliable_commands (ENetPeer *peer)
 
static void enet_protocol_send_acknowledgements (ENetHost *host, ENetPeer *peer)
 
static int enet_protocol_send_outgoing_commands (ENetHost *host, ENetEvent *event, int checkForTimeouts)
 
static int enet_protocol_send_reliable_outgoing_commands (ENetHost *host, ENetPeer *peer)
 
static void enet_protocol_send_unreliable_outgoing_commands (ENetHost *host, ENetPeer *peer)
 

Variables

static size_t commandSizes [ENET_PROTOCOL_COMMAND_COUNT]
 

Detailed Description

ENet protocol functions.

Macro Definition Documentation

#define ENET_BUILDING_LIB   1

Function Documentation

static int enet_protocol_check_timeouts ( ENetHost host,
ENetPeer peer,
ENetEvent event 
)
static
size_t enet_protocol_command_size ( enet_uint8  commandNumber)
static int enet_protocol_dispatch_incoming_commands ( ENetHost host,
ENetEvent event 
)
static
static void enet_protocol_dispatch_state ( ENetHost host,
ENetPeer peer,
ENetPeerState  state 
)
static
static int enet_protocol_handle_acknowledge ( ENetHost host,
ENetEvent event,
ENetPeer peer,
const ENetProtocol command 
)
static
static int enet_protocol_handle_bandwidth_limit ( ENetHost host,
ENetPeer peer,
const ENetProtocol command 
)
static
static ENetPeer* enet_protocol_handle_connect ( ENetHost host,
ENetProtocolHeader header,
ENetProtocol command 
)
static
static int enet_protocol_handle_disconnect ( ENetHost host,
ENetPeer peer,
const ENetProtocol command 
)
static
static int enet_protocol_handle_incoming_commands ( ENetHost host,
ENetEvent event 
)
static
static int enet_protocol_handle_ping ( ENetHost host,
ENetPeer peer,
const ENetProtocol command 
)
static
static int enet_protocol_handle_send_fragment ( ENetHost host,
ENetPeer peer,
const ENetProtocol command,
enet_uint8 **  currentData 
)
static
static int enet_protocol_handle_send_reliable ( ENetHost host,
ENetPeer peer,
const ENetProtocol command,
enet_uint8 **  currentData 
)
static
static int enet_protocol_handle_send_unreliable ( ENetHost host,
ENetPeer peer,
const ENetProtocol command,
enet_uint8 **  currentData 
)
static
static int enet_protocol_handle_send_unsequenced ( ENetHost host,
ENetPeer peer,
const ENetProtocol command,
enet_uint8 **  currentData 
)
static
static int enet_protocol_handle_throttle_configure ( ENetHost host,
ENetPeer peer,
const ENetProtocol command 
)
static
static int enet_protocol_handle_verify_connect ( ENetHost host,
ENetEvent event,
ENetPeer peer,
const ENetProtocol command 
)
static
static void enet_protocol_notify_connect ( ENetHost host,
ENetPeer peer,
ENetEvent event 
)
static
static void enet_protocol_notify_disconnect ( ENetHost host,
ENetPeer peer,
ENetEvent event 
)
static
static int enet_protocol_receive_incoming_commands ( ENetHost host,
ENetEvent event,
ENetAddressFamily  family 
)
static
static ENetProtocolCommand enet_protocol_remove_sent_reliable_command ( ENetPeer peer,
enet_uint16  reliableSequenceNumber,
enet_uint8  channelID 
)
static
static void enet_protocol_remove_sent_unreliable_commands ( ENetPeer peer)
static
static void enet_protocol_send_acknowledgements ( ENetHost host,
ENetPeer peer 
)
static
static int enet_protocol_send_outgoing_commands ( ENetHost host,
ENetEvent event,
int  checkForTimeouts 
)
static
static int enet_protocol_send_reliable_outgoing_commands ( ENetHost host,
ENetPeer peer 
)
static
static void enet_protocol_send_unreliable_outgoing_commands ( ENetHost host,
ENetPeer peer 
)
static

Variable Documentation

size_t commandSizes[ENET_PROTOCOL_COMMAND_COUNT]
static
Initial value:
=
{
0,
sizeof (ENetProtocolPing),
}
Definition: protocol.h:118
Definition: protocol.h:144
struct _ENetProtocolThrottleConfigure ENetProtocolThrottleConfigure
struct _ENetProtocolSendUnsequenced ENetProtocolSendUnsequenced
Definition: protocol.h:133
struct _ENetProtocolAcknowledge ENetProtocolAcknowledge
Definition: protocol.h:164
Definition: protocol.h:83
struct _ENetProtocolPing ENetProtocolPing
struct _ENetProtocolSendUnreliable ENetProtocolSendUnreliable
struct _ENetProtocolVerifyConnect ENetProtocolVerifyConnect