[][src]Struct enet_sys::_ENetHost

#[repr(C)]
pub struct _ENetHost { 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 continueSending: c_int, 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, }

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: ENetSocketaddress: ENetAddress

< Internet address of the host

incomingBandwidth: enet_uint32

< downstream bandwidth of the host

outgoingBandwidth: enet_uint32

< upstream bandwidth of the host

bandwidthThrottleEpoch: enet_uint32mtu: enet_uint32randomSeed: enet_uint32recalculateBandwidthLimits: c_intpeers: *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_uint32dispatchQueue: ENetListcontinueSending: c_intpacketSize: usizeheaderFlags: enet_uint16commands: [ENetProtocol; 32]commandCount: usizebuffers: [ENetBuffer; 65]bufferCount: usizechecksum: ENetChecksumCallback

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

compressor: ENetCompressorpacketData: [[enet_uint8; 4096]; 2]receivedAddress: ENetAddressreceivedData: *mut enet_uint8receivedDataLength: usizetotalSentData: 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: usizebandwidthLimitedPeers: usizeduplicatePeers: 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

impl Copy for _ENetHost[src]

impl Clone for _ENetHost[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl !Send for _ENetHost

impl !Sync for _ENetHost

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.