#[repr(C)]pub struct _ENetHost {Show 36 fields
pub socket: ENetSocket,
pub address: ENetAddress,
pub incomingBandwidth: enet_uint32,
pub outgoingBandwidth: enet_uint32,
pub bandwidthThrottleEpoch: enet_uint32,
pub mtu: enet_uint32,
pub randomSeed: enet_uint32,
pub recalculateBandwidthLimits: c_int,
pub peers: *mut ENetPeer,
pub peerCount: usize,
pub channelLimit: usize,
pub serviceTime: enet_uint32,
pub dispatchQueue: ENetList,
pub totalQueued: enet_uint32,
pub packetSize: usize,
pub headerFlags: enet_uint16,
pub commands: [ENetProtocol; 32],
pub commandCount: usize,
pub buffers: [ENetBuffer; 65],
pub bufferCount: usize,
pub checksum: ENetChecksumCallback,
pub compressor: ENetCompressor,
pub packetData: [[enet_uint8; 4096]; 2],
pub receivedAddress: ENetAddress,
pub receivedData: *mut enet_uint8,
pub receivedDataLength: usize,
pub totalSentData: enet_uint32,
pub totalSentPackets: enet_uint32,
pub totalReceivedData: enet_uint32,
pub totalReceivedPackets: enet_uint32,
pub intercept: ENetInterceptCallback,
pub connectedPeers: usize,
pub bandwidthLimitedPeers: usize,
pub duplicatePeers: usize,
pub maximumPacketSize: usize,
pub maximumWaitingData: usize,
}
Expand description
An ENet host for communicating with peers.
No fields should be modified unless otherwise stated.
@sa enet_host_create() @sa enet_host_destroy() @sa enet_host_connect() @sa enet_host_service() @sa enet_host_flush() @sa enet_host_broadcast() @sa enet_host_compress() @sa enet_host_compress_with_range_coder() @sa enet_host_channel_limit() @sa enet_host_bandwidth_limit() @sa enet_host_bandwidth_throttle()
Fields§
§socket: ENetSocket
§address: ENetAddress
< Internet address of the host
incomingBandwidth: enet_uint32
< downstream bandwidth of the host
outgoingBandwidth: enet_uint32
< upstream bandwidth of the host
bandwidthThrottleEpoch: enet_uint32
§mtu: enet_uint32
§randomSeed: enet_uint32
§recalculateBandwidthLimits: c_int
§peers: *mut ENetPeer
< array of peers allocated for this host
peerCount: usize
< number of peers allocated for this host
channelLimit: usize
< maximum number of channels allowed for connected peers
serviceTime: enet_uint32
§dispatchQueue: ENetList
§totalQueued: enet_uint32
§packetSize: usize
§headerFlags: enet_uint16
§commands: [ENetProtocol; 32]
§commandCount: usize
§buffers: [ENetBuffer; 65]
§bufferCount: usize
§checksum: ENetChecksumCallback
< callback the user can set to enable packet checksums for this host
compressor: ENetCompressor
§packetData: [[enet_uint8; 4096]; 2]
§receivedAddress: ENetAddress
§receivedData: *mut enet_uint8
§receivedDataLength: usize
§totalSentData: enet_uint32
< total data sent, user should reset to 0 as needed to prevent overflow
totalSentPackets: enet_uint32
< total UDP packets sent, user should reset to 0 as needed to prevent overflow
totalReceivedData: enet_uint32
< total data received, user should reset to 0 as needed to prevent overflow
totalReceivedPackets: enet_uint32
< total UDP packets received, user should reset to 0 as needed to prevent overflow
intercept: ENetInterceptCallback
< callback the user can set to intercept received raw UDP packets
connectedPeers: usize
§bandwidthLimitedPeers: usize
§duplicatePeers: usize
< optional number of allowed peers from duplicate IPs, defaults to ENET_PROTOCOL_MAXIMUM_PEER_ID
maximumPacketSize: usize
< the maximum allowable packet size that may be sent or received on a peer
maximumWaitingData: usize
< the maximum aggregate amount of buffer space a peer may use waiting for packets to be delivered