Struct enet_sys::_ENetHost

source ·
#[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

Trait Implementations§

source§

impl Clone for _ENetHost

source§

fn clone(&self) -> _ENetHost

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Copy for _ENetHost

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.