pub type ENetHost = _ENetHost;
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()
Aliased Type§
struct ENetHost {Show 36 fields
pub socket: i32,
pub address: _ENetAddress,
pub incomingBandwidth: u32,
pub outgoingBandwidth: u32,
pub bandwidthThrottleEpoch: u32,
pub mtu: u32,
pub randomSeed: u32,
pub recalculateBandwidthLimits: i32,
pub peers: *mut _ENetPeer,
pub peerCount: usize,
pub channelLimit: usize,
pub serviceTime: u32,
pub dispatchQueue: _ENetList,
pub totalQueued: u32,
pub packetSize: usize,
pub headerFlags: u16,
pub commands: [_ENetProtocol; 32],
pub commandCount: usize,
pub buffers: [ENetBuffer; 65],
pub bufferCount: usize,
pub checksum: Option<unsafe extern "C" fn(_: *const ENetBuffer, _: usize) -> u32>,
pub compressor: _ENetCompressor,
pub packetData: [[u8; 4096]; 2],
pub receivedAddress: _ENetAddress,
pub receivedData: *mut u8,
pub receivedDataLength: usize,
pub totalSentData: u32,
pub totalSentPackets: u32,
pub totalReceivedData: u32,
pub totalReceivedPackets: u32,
pub intercept: Option<unsafe extern "C" fn(_: *mut _ENetHost, _: *mut _ENetEvent) -> i32>,
pub connectedPeers: usize,
pub bandwidthLimitedPeers: usize,
pub duplicatePeers: usize,
pub maximumPacketSize: usize,
pub maximumWaitingData: usize,
}
Fields§
§socket: i32
§address: _ENetAddress
< Internet address of the host
incomingBandwidth: u32
< downstream bandwidth of the host
outgoingBandwidth: u32
< upstream bandwidth of the host
bandwidthThrottleEpoch: u32
§mtu: u32
§randomSeed: u32
§recalculateBandwidthLimits: i32
§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: u32
§dispatchQueue: _ENetList
§totalQueued: u32
§packetSize: usize
§headerFlags: u16
§commands: [_ENetProtocol; 32]
§commandCount: usize
§buffers: [ENetBuffer; 65]
§bufferCount: usize
§checksum: Option<unsafe extern "C" fn(_: *const ENetBuffer, _: usize) -> u32>
< callback the user can set to enable packet checksums for this host
compressor: _ENetCompressor
§packetData: [[u8; 4096]; 2]
§receivedAddress: _ENetAddress
§receivedData: *mut u8
§receivedDataLength: usize
§totalSentData: u32
< total data sent, user should reset to 0 as needed to prevent overflow
totalSentPackets: u32
< total UDP packets sent, user should reset to 0 as needed to prevent overflow
totalReceivedData: u32
< total data received, user should reset to 0 as needed to prevent overflow
totalReceivedPackets: u32
< total UDP packets received, user should reset to 0 as needed to prevent overflow
intercept: Option<unsafe extern "C" fn(_: *mut _ENetHost, _: *mut _ENetEvent) -> i32>
< 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