ENet v1.3.17
Reliable UDP networking library
Data Structures | Macros | Enumerations
protocol.h File Reference

ENet protocol. More...

#include "enet/types.h"

Data Structures

union  ENetProtocol
 
struct  ENetProtocolAcknowledge
 
struct  ENetProtocolBandwidthLimit
 
struct  ENetProtocolCommandHeader
 
struct  ENetProtocolConnect
 
struct  ENetProtocolDisconnect
 
struct  ENetProtocolHeader
 
struct  ENetProtocolPing
 
struct  ENetProtocolSendFragment
 
struct  ENetProtocolSendReliable
 
struct  ENetProtocolSendUnreliable
 
struct  ENetProtocolSendUnsequenced
 
struct  ENetProtocolThrottleConfigure
 
struct  ENetProtocolVerifyConnect
 

Macros

#define ENET_PACKED
 

Enumerations

enum  {
  ENET_PROTOCOL_MINIMUM_MTU = 576 ,
  ENET_PROTOCOL_MAXIMUM_MTU = 4096 ,
  ENET_PROTOCOL_MAXIMUM_PACKET_COMMANDS = 32 ,
  ENET_PROTOCOL_MINIMUM_WINDOW_SIZE = 4096 ,
  ENET_PROTOCOL_MAXIMUM_WINDOW_SIZE = 65536 ,
  ENET_PROTOCOL_MINIMUM_CHANNEL_COUNT = 1 ,
  ENET_PROTOCOL_MAXIMUM_CHANNEL_COUNT = 255 ,
  ENET_PROTOCOL_MAXIMUM_PEER_ID = 0xFFF ,
  ENET_PROTOCOL_MAXIMUM_FRAGMENT_COUNT = 1024 * 1024
}
 
enum  ENetProtocolCommand {
  ENET_PROTOCOL_COMMAND_NONE = 0 ,
  ENET_PROTOCOL_COMMAND_ACKNOWLEDGE = 1 ,
  ENET_PROTOCOL_COMMAND_CONNECT = 2 ,
  ENET_PROTOCOL_COMMAND_VERIFY_CONNECT = 3 ,
  ENET_PROTOCOL_COMMAND_DISCONNECT = 4 ,
  ENET_PROTOCOL_COMMAND_PING = 5 ,
  ENET_PROTOCOL_COMMAND_SEND_RELIABLE = 6 ,
  ENET_PROTOCOL_COMMAND_SEND_UNRELIABLE = 7 ,
  ENET_PROTOCOL_COMMAND_SEND_FRAGMENT = 8 ,
  ENET_PROTOCOL_COMMAND_SEND_UNSEQUENCED = 9 ,
  ENET_PROTOCOL_COMMAND_BANDWIDTH_LIMIT = 10 ,
  ENET_PROTOCOL_COMMAND_THROTTLE_CONFIGURE = 11 ,
  ENET_PROTOCOL_COMMAND_SEND_UNRELIABLE_FRAGMENT = 12 ,
  ENET_PROTOCOL_COMMAND_COUNT = 13 ,
  ENET_PROTOCOL_COMMAND_MASK = 0x0F
}
 
enum  ENetProtocolFlag {
  ENET_PROTOCOL_COMMAND_FLAG_ACKNOWLEDGE = (1 << 7) ,
  ENET_PROTOCOL_COMMAND_FLAG_UNSEQUENCED = (1 << 6) ,
  ENET_PROTOCOL_HEADER_FLAG_COMPRESSED = (1 << 14) ,
  ENET_PROTOCOL_HEADER_FLAG_SENT_TIME = (1 << 15) ,
  ENET_PROTOCOL_HEADER_FLAG_MASK = ENET_PROTOCOL_HEADER_FLAG_COMPRESSED | ENET_PROTOCOL_HEADER_FLAG_SENT_TIME ,
  ENET_PROTOCOL_HEADER_SESSION_MASK = (3 << 12) ,
  ENET_PROTOCOL_HEADER_SESSION_SHIFT = 12
}
 

Detailed Description

ENet protocol.

Macro Definition Documentation

◆ ENET_PACKED

#define ENET_PACKED

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
ENET_PROTOCOL_MINIMUM_MTU 
ENET_PROTOCOL_MAXIMUM_MTU 
ENET_PROTOCOL_MAXIMUM_PACKET_COMMANDS 
ENET_PROTOCOL_MINIMUM_WINDOW_SIZE 
ENET_PROTOCOL_MAXIMUM_WINDOW_SIZE 
ENET_PROTOCOL_MINIMUM_CHANNEL_COUNT 
ENET_PROTOCOL_MAXIMUM_CHANNEL_COUNT 
ENET_PROTOCOL_MAXIMUM_PEER_ID 
ENET_PROTOCOL_MAXIMUM_FRAGMENT_COUNT 

◆ ENetProtocolCommand

Enumerator
ENET_PROTOCOL_COMMAND_NONE 
ENET_PROTOCOL_COMMAND_ACKNOWLEDGE 
ENET_PROTOCOL_COMMAND_CONNECT 
ENET_PROTOCOL_COMMAND_VERIFY_CONNECT 
ENET_PROTOCOL_COMMAND_DISCONNECT 
ENET_PROTOCOL_COMMAND_PING 
ENET_PROTOCOL_COMMAND_SEND_RELIABLE 
ENET_PROTOCOL_COMMAND_SEND_UNRELIABLE 
ENET_PROTOCOL_COMMAND_SEND_FRAGMENT 
ENET_PROTOCOL_COMMAND_SEND_UNSEQUENCED 
ENET_PROTOCOL_COMMAND_BANDWIDTH_LIMIT 
ENET_PROTOCOL_COMMAND_THROTTLE_CONFIGURE 
ENET_PROTOCOL_COMMAND_SEND_UNRELIABLE_FRAGMENT 
ENET_PROTOCOL_COMMAND_COUNT 
ENET_PROTOCOL_COMMAND_MASK 

◆ ENetProtocolFlag

Enumerator
ENET_PROTOCOL_COMMAND_FLAG_ACKNOWLEDGE 
ENET_PROTOCOL_COMMAND_FLAG_UNSEQUENCED 
ENET_PROTOCOL_HEADER_FLAG_COMPRESSED 
ENET_PROTOCOL_HEADER_FLAG_SENT_TIME 
ENET_PROTOCOL_HEADER_FLAG_MASK 
ENET_PROTOCOL_HEADER_SESSION_MASK 
ENET_PROTOCOL_HEADER_SESSION_SHIFT