Logo Search packages:      
Sourcecode: mana version File versions  Download package

Classes | Defines | Typedefs | Enumerations | Functions

enet.h File Reference

ENet public header file. More...

#include <stdlib.h>
#include "enet/unix.h"
#include "enet/types.h"
#include "enet/protocol.h"
#include "enet/list.h"
#include "enet/callbacks.h"
Include dependency graph for enet.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _ENetAcknowledgement
struct  _ENetAddress
struct  _ENetChannel
struct  _ENetCompressor
struct  _ENetEvent
struct  _ENetHost
struct  _ENetIncomingCommand
struct  _ENetOutgoingCommand
struct  _ENetPacket
struct  _ENetPeer

Defines

#define ENET_BUFFER_MAXIMUM   (1 + 2 * ENET_PROTOCOL_MAXIMUM_PACKET_COMMANDS)
#define ENET_VERSION   ENET_VERSION_CREATE(ENET_VERSION_MAJOR, ENET_VERSION_MINOR, ENET_VERSION_PATCH)
#define ENET_VERSION_CREATE(major, minor, patch)   (((major)<<16) | ((minor)<<8) | (patch))
#define ENET_VERSION_MAJOR   1
#define ENET_VERSION_MINOR   3
#define ENET_VERSION_PATCH   0

Typedefs

typedef size_t bufferCount
typedef struct _ENetAcknowledgement ENetAcknowledgement
typedef struct _ENetAddress ENetAddress
typedef struct _ENetChannel ENetChannel
typedef struct _ENetCompressor ENetCompressor
typedef struct _ENetEvent ENetEvent
typedef enum _ENetEventType ENetEventType
typedef struct _ENetHost ENetHost
typedef struct _ENetIncomingCommand ENetIncomingCommand
typedef struct _ENetOutgoingCommand ENetOutgoingCommand
typedef struct _ENetPacket ENetPacket
typedef enum _ENetPacketFlag ENetPacketFlag
typedef struct _ENetPeer ENetPeer
typedef enum _ENetPeerState ENetPeerState
typedef enum _ENetSocketOption ENetSocketOption
typedef enum _ENetSocketType ENetSocketType
typedef enum _ENetSocketWait ENetSocketWait
typedef enet_uint32 ENetVersion

Enumerations

enum  { ENET_HOST_ANY = 0, ENET_HOST_BROADCAST = 0xFFFFFFFF, ENET_PORT_ANY = 0 }
enum  {
  ENET_HOST_RECEIVE_BUFFER_SIZE = 256 * 1024, ENET_HOST_SEND_BUFFER_SIZE = 256 * 1024, ENET_HOST_BANDWIDTH_THROTTLE_INTERVAL = 1000, ENET_HOST_DEFAULT_MTU = 1400,
  ENET_PEER_DEFAULT_ROUND_TRIP_TIME = 500, ENET_PEER_DEFAULT_PACKET_THROTTLE = 32, ENET_PEER_PACKET_THROTTLE_SCALE = 32, ENET_PEER_PACKET_THROTTLE_COUNTER = 7,
  ENET_PEER_PACKET_THROTTLE_ACCELERATION = 2, ENET_PEER_PACKET_THROTTLE_DECELERATION = 2, ENET_PEER_PACKET_THROTTLE_INTERVAL = 5000, ENET_PEER_PACKET_LOSS_SCALE = (1 << 16),
  ENET_PEER_PACKET_LOSS_INTERVAL = 10000, ENET_PEER_WINDOW_SIZE_SCALE = 64 * 1024, ENET_PEER_TIMEOUT_LIMIT = 32, ENET_PEER_TIMEOUT_MINIMUM = 5000,
  ENET_PEER_TIMEOUT_MAXIMUM = 30000, ENET_PEER_PING_INTERVAL = 500, ENET_PEER_UNSEQUENCED_WINDOWS = 64, ENET_PEER_UNSEQUENCED_WINDOW_SIZE = 1024,
  ENET_PEER_FREE_UNSEQUENCED_WINDOWS = 32, ENET_PEER_RELIABLE_WINDOWS = 16, ENET_PEER_RELIABLE_WINDOW_SIZE = 0x1000, ENET_PEER_FREE_RELIABLE_WINDOWS = 8
}
enum  _ENetEventType { ENET_EVENT_TYPE_NONE = 0, ENET_EVENT_TYPE_CONNECT = 1, ENET_EVENT_TYPE_DISCONNECT = 2, ENET_EVENT_TYPE_RECEIVE = 3 }
enum  _ENetPacketFlag { ENET_PACKET_FLAG_RELIABLE = (1 << 0), ENET_PACKET_FLAG_UNSEQUENCED = (1 << 1), ENET_PACKET_FLAG_NO_ALLOCATE = (1 << 2) }
enum  _ENetPeerState {
  ENET_PEER_STATE_DISCONNECTED = 0, ENET_PEER_STATE_CONNECTING = 1, ENET_PEER_STATE_ACKNOWLEDGING_CONNECT = 2, ENET_PEER_STATE_CONNECTION_PENDING = 3,
  ENET_PEER_STATE_CONNECTION_SUCCEEDED = 4, ENET_PEER_STATE_CONNECTED = 5, ENET_PEER_STATE_DISCONNECT_LATER = 6, ENET_PEER_STATE_DISCONNECTING = 7,
  ENET_PEER_STATE_ACKNOWLEDGING_DISCONNECT = 8, ENET_PEER_STATE_ZOMBIE = 9
}
enum  _ENetSocketOption {
  ENET_SOCKOPT_NONBLOCK = 1, ENET_SOCKOPT_BROADCAST = 2, ENET_SOCKOPT_RCVBUF = 3, ENET_SOCKOPT_SNDBUF = 4,
  ENET_SOCKOPT_REUSEADDR = 5
}
enum  _ENetSocketType { ENET_SOCKET_TYPE_STREAM = 1, ENET_SOCKET_TYPE_DATAGRAM = 2 }
enum  _ENetSocketWait { ENET_SOCKET_WAIT_NONE = 0, ENET_SOCKET_WAIT_SEND = (1 << 0), ENET_SOCKET_WAIT_RECEIVE = (1 << 1) }

Functions

ENET_API int enet_address_get_host (const ENetAddress *address, char *hostName, size_t nameLength)
ENET_API int enet_address_get_host_ip (const ENetAddress *address, char *hostName, size_t nameLength)
ENET_API int enet_address_set_host (ENetAddress *address, const char *hostName)
enet_uint32 enet_crc32 (const ENetBuffer *, size_t)
ENET_API void enet_deinitialize (void)
ENET_API void enet_host_bandwidth_limit (ENetHost *, enet_uint32, enet_uint32)
void enet_host_bandwidth_throttle (ENetHost *)
ENET_API void enet_host_broadcast (ENetHost *, enet_uint8, ENetPacket *)
ENET_API void enet_host_channel_limit (ENetHost *, size_t)
ENET_API int enet_host_check_events (ENetHost *, ENetEvent *)
ENET_API void enet_host_compress (ENetHost *, const ENetCompressor *)
ENET_API int enet_host_compress_with_range_coder (ENetHost *host)
ENET_API ENetPeerenet_host_connect (ENetHost *, const ENetAddress *, size_t, enet_uint32)
ENET_API ENetHostenet_host_create (const ENetAddress *, size_t, size_t, enet_uint32, enet_uint32)
ENET_API void enet_host_destroy (ENetHost *)
ENET_API void enet_host_flush (ENetHost *)
ENET_API int enet_host_service (ENetHost *, ENetEvent *, enet_uint32)
ENET_API int enet_initialize (void)
ENET_API int enet_initialize_with_callbacks (ENetVersion version, const ENetCallbacks *inits)
ENET_API ENetPacketenet_packet_create (const void *, size_t, enet_uint32)
ENET_API void enet_packet_destroy (ENetPacket *)
ENET_API int enet_packet_resize (ENetPacket *, size_t)
ENET_API void enet_peer_disconnect (ENetPeer *, enet_uint32)
ENET_API void enet_peer_disconnect_later (ENetPeer *, enet_uint32)
ENET_API void enet_peer_disconnect_now (ENetPeer *, enet_uint32)
void enet_peer_dispatch_incoming_reliable_commands (ENetPeer *, ENetChannel *)
void enet_peer_dispatch_incoming_unreliable_commands (ENetPeer *, ENetChannel *)
ENET_API void enet_peer_ping (ENetPeer *)
ENetAcknowledgementenet_peer_queue_acknowledgement (ENetPeer *, const ENetProtocol *, enet_uint16)
ENetIncomingCommandenet_peer_queue_incoming_command (ENetPeer *, const ENetProtocol *, ENetPacket *, enet_uint32)
ENetOutgoingCommandenet_peer_queue_outgoing_command (ENetPeer *, const ENetProtocol *, ENetPacket *, enet_uint32, enet_uint16)
ENET_API ENetPacketenet_peer_receive (ENetPeer *, enet_uint8 *channelID)
ENET_API void enet_peer_reset (ENetPeer *)
void enet_peer_reset_queues (ENetPeer *)
ENET_API int enet_peer_send (ENetPeer *, enet_uint8, ENetPacket *)
void enet_peer_setup_outgoing_command (ENetPeer *, ENetOutgoingCommand *)
int enet_peer_throttle (ENetPeer *, enet_uint32)
ENET_API void enet_peer_throttle_configure (ENetPeer *, enet_uint32, enet_uint32, enet_uint32)
size_t enet_protocol_command_size (enet_uint8)
ENET_API size_t enet_range_coder_compress (void *, const ENetBuffer *, size_t, size_t, enet_uint8 *, size_t)
ENET_API void * enet_range_coder_create (void)
ENET_API size_t enet_range_coder_decompress (void *, const enet_uint8 *, size_t, enet_uint8 *, size_t)
ENET_API void enet_range_coder_destroy (void *)
ENET_API ENetSocket enet_socket_accept (ENetSocket, ENetAddress *)
ENET_API int enet_socket_bind (ENetSocket, const ENetAddress *)
ENET_API int enet_socket_connect (ENetSocket, const ENetAddress *)
ENET_API ENetSocket enet_socket_create (ENetSocketType)
ENET_API void enet_socket_destroy (ENetSocket)
ENET_API int enet_socket_listen (ENetSocket, int)
ENET_API int enet_socket_receive (ENetSocket, ENetAddress *, ENetBuffer *, size_t)
ENET_API int enet_socket_send (ENetSocket, const ENetAddress *, const ENetBuffer *, size_t)
ENET_API int enet_socket_set_option (ENetSocket, ENetSocketOption, int)
ENET_API int enet_socket_wait (ENetSocket, enet_uint32 *, enet_uint32)
ENET_API int enet_socketset_select (ENetSocket, ENetSocketSet *, ENetSocketSet *, enet_uint32)
ENET_API enet_uint32 enet_time_get (void)
ENET_API void enet_time_set (enet_uint32)
typedef enet_uint32 (ENET_CALLBACK *ENetChecksumCallback)(const ENetBuffer *buffers
typedef void (ENET_CALLBACK *ENetPacketFreeCallback)(struct _ENetPacket *)

Detailed Description

ENet public header file.

Definition in file enet.h.


Generated by  Doxygen 1.6.0   Back to index