Loading...
Searching...
No Matches
ENetHost Struct Reference

An ENet host for communicating with peers. More...

`#include <enet.h>`

## Data Fields

ENetAddress | address
| Internet address of the host.
size_t | bandwidthLimitedPeers
enet_uint32 | bandwidthThrottleEpoch
size_t | bufferCount
ENetBuffer | buffers [(1+2 *ENET_PROTOCOL_MAXIMUM_PACKET_COMMANDS)]
size_t | channelLimit
| maximum number of channels allowed for connected peers
ENetChecksumCallback | checksum
| callback the user can set to enable packet checksums for this host
size_t | commandCount
ENetProtocol | commands [ENET_PROTOCOL_MAXIMUM_PACKET_COMMANDS]
ENetCompressor | compressor
size_t | connectedPeers
ENetList | dispatchQueue
size_t | duplicatePeers
| optional number of allowed peers from duplicate IPs, defaults to ENET_PROTOCOL_MAXIMUM_PEER_ID
enet_uint16 | headerFlags
enet_uint32 | incomingBandwidth
| downstream bandwidth of the host
ENetInterceptCallback | intercept
| callback the user can set to intercept received raw UDP packets
size_t | maximumPacketSize
| the maximum allowable packet size that may be sent or received on a peer
size_t | maximumWaitingData
| the maximum aggregate amount of buffer space a peer may use waiting for packets to be delivered
enet_uint32 | mtu
enet_uint32 | outgoingBandwidth
| upstream bandwidth of the host
enet_uint8 | packetData [2][ENET_PROTOCOL_MAXIMUM_MTU]
size_t | packetSize
size_t | peerCount
| number of peers allocated for this host
ENetPeer * | peers
| array of peers allocated for this host
enet_uint32 | randomSeed
int | recalculateBandwidthLimits
ENetAddress | receivedAddress
enet_uint8 * | receivedData
size_t | receivedDataLength
enet_uint32 | serviceTime
ENetSocket | socket
enet_uint32 | totalQueued
enet_uint32 | totalReceivedData
| total data received, user should reset to 0 as needed to prevent overflow
enet_uint32 | totalReceivedPackets
| total UDP packets received, user should reset to 0 as needed to prevent overflow
enet_uint32 | totalSentData
| total data sent, user should reset to 0 as needed to prevent overflow
enet_uint32 | totalSentPackets
| total UDP packets sent, user should reset to 0 as needed to prevent overflow

## Detailed Description

An ENet host for communicating with peers.

No fields should be modified unless otherwise stated.

See also
  enet_host_create()
  enet_host_destroy()
  enet_host_connect()
  enet_host_service()
  enet_host_flush()
  enet_host_broadcast()
  enet_host_compress()
  enet_host_compress_with_range_coder()
  enet_host_channel_limit()
  enet_host_bandwidth_limit()
  enet_host_bandwidth_throttle()

## Field Documentation

## address

ENetAddress ENetHost::address

Internet address of the host.

## bandwidthLimitedPeers

size_t ENetHost::bandwidthLimitedPeers

## bandwidthThrottleEpoch

enet_uint32 ENetHost::bandwidthThrottleEpoch

## bufferCount

size_t ENetHost::bufferCount

## buffers

ENetBuffer ENetHost::buffers[(1+2 *ENET_PROTOCOL_MAXIMUM_PACKET_COMMANDS)]

## channelLimit

size_t ENetHost::channelLimit

maximum number of channels allowed for connected peers

## checksum

ENetChecksumCallback ENetHost::checksum

callback the user can set to enable packet checksums for this host

## commandCount

size_t ENetHost::commandCount

## commands

ENetProtocol ENetHost::commands[ENET_PROTOCOL_MAXIMUM_PACKET_COMMANDS]

## compressor

ENetCompressor ENetHost::compressor

## connectedPeers

size_t ENetHost::connectedPeers

## dispatchQueue

ENetList ENetHost::dispatchQueue

## duplicatePeers

size_t ENetHost::duplicatePeers

optional number of allowed peers from duplicate IPs, defaults to ENET_PROTOCOL_MAXIMUM_PEER_ID

## headerFlags

enet_uint16 ENetHost::headerFlags

## incomingBandwidth

enet_uint32 ENetHost::incomingBandwidth

downstream bandwidth of the host

## intercept

ENetInterceptCallback ENetHost::intercept

callback the user can set to intercept received raw UDP packets

## maximumPacketSize

size_t ENetHost::maximumPacketSize

the maximum allowable packet size that may be sent or received on a peer

## maximumWaitingData

size_t ENetHost::maximumWaitingData

the maximum aggregate amount of buffer space a peer may use waiting for packets to be delivered

## mtu

enet_uint32 ENetHost::mtu

## outgoingBandwidth

enet_uint32 ENetHost::outgoingBandwidth

upstream bandwidth of the host

## packetData

enet_uint8 ENetHost::packetData[2][ENET_PROTOCOL_MAXIMUM_MTU]

## packetSize

size_t ENetHost::packetSize

## peerCount

size_t ENetHost::peerCount

number of peers allocated for this host

## peers

ENetPeer* ENetHost::peers

array of peers allocated for this host

## randomSeed

enet_uint32 ENetHost::randomSeed

## recalculateBandwidthLimits

int ENetHost::recalculateBandwidthLimits

## receivedAddress

ENetAddress ENetHost::receivedAddress

## receivedData

enet_uint8* ENetHost::receivedData

## receivedDataLength

size_t ENetHost::receivedDataLength

## serviceTime

enet_uint32 ENetHost::serviceTime

## socket

ENetSocket ENetHost::socket

## totalQueued

enet_uint32 ENetHost::totalQueued

## totalReceivedData

enet_uint32 ENetHost::totalReceivedData

total data received, user should reset to 0 as needed to prevent overflow

## totalReceivedPackets

enet_uint32 ENetHost::totalReceivedPackets

total UDP packets received, user should reset to 0 as needed to prevent overflow

## totalSentData

enet_uint32 ENetHost::totalSentData

total data sent, user should reset to 0 as needed to prevent overflow

## totalSentPackets

enet_uint32 ENetHost::totalSentPackets

total UDP packets sent, user should reset to 0 as needed to prevent overflow

The documentation for this struct was generated from the following file:

- include/enet/enet.h