Number of channels allocated for communication with this peer.
Whether this peer is currently in a connected state.
Downstream bandwidth of the peer in bytes/second.
Incoming bandwidth throttle epoch.
Total amount of downstream data received from this peer.
The IP address of the peer.
Last round trip time.
Last round trip time variance.
Lowest round trip time recorded.
The maximum transmission unit (MTU) for this peer.
The peer's network ID.
Upstream bandwidth of the peer in bytes/second.
Outgoing bandwidth throttle epoch.
Total amount of upstream data sent to this peer.
Mean packet loss of reliable packets as a ratio.
Variance of the mean packet loss.
Total number of packets lost from this peer.
Total number of packets sent to this peer.
Current packet throttle value.
Packet throttle acceleration rate.
Packet throttle deceleration rate.
Packet throttle interval.
Ping interval in milliseconds.
The port number of the peer.
Mean round trip time (RTT) in milliseconds between sending a reliable packet and receiving its acknowledgement.
Round trip time (RTT) variance in milliseconds.
Round trip time (RTT) in milliseconds.
The peer's current state (as numeric value).
Timeout limit value.
Maximum timeout value in milliseconds.
Minimum timeout value in milliseconds.
Request a disconnection from this peer. An Event::Disconnect will be generated once the disconnection is complete.
The host instance managing this peer
An integer value to pass to the peer upon disconnection
True on success
Request a disconnection from this peer, but only after all queued outgoing packets are sent. An Event::Disconnect will be generated once the disconnection is complete.
The host instance managing this peer
An integer value to pass to the peer upon disconnection
True on success
Force an immediate disconnection from this peer. No Event::Disconnect will be generated. The foreign peer is not guaranteed to receive the disconnect notification.
The host instance managing this peer
An integer value to pass to the peer upon disconnection
True on success
Send a ping request to this peer. Ping requests factor into the mean round trip time. ENet automatically pings all connected peers at regular intervals, however this function may be called to ensure more frequent ping requests.
The host instance managing this peer
Forcefully disconnect this peer without notification. The foreign host represented by this peer is not notified of the disconnection and will timeout.
The host instance managing this peer
True on success
Send a reliable packet to this peer on the specified channel.
The host instance managing this peer
The packet data to send
True if packet queued successfully
Set the maximum transmission unit (MTU) for this peer.
The host instance managing this peer
The MTU value (must be between PROTOCOL_MINIMUM_MTU and PROTOCOL_MAXIMUM_MTU)
True on success
Set the interval at which pings will be sent to this peer in milliseconds. Pings are used to monitor connection liveness and dynamically adjust the throttle during periods of low traffic for better responsiveness during traffic spikes.
The host instance managing this peer
True on success
Configure throttle parameters for this peer. The throttle represents a probability that an unreliable packet should be sent. When throttle is at maximum, 100% of unreliable packets are sent. When at 0, all unreliable packets are dropped.
The host instance managing this peer
Interval in milliseconds over which to measure lowest mean RTT
Rate at which to increase throttle probability as RTT declines
Rate at which to decrease throttle probability as RTT increases
True on success
Set timeout parameters for this peer. Timeout values use an exponential backoff mechanism. If a reliable packet is not acknowledged within some multiple of the average RTT, the timeout will be doubled until it reaches the limit.
The host instance managing this peer
The timeout limit (defaults to PEER_TIMEOUT_LIMIT if 0)
The minimum timeout (defaults to PEER_TIMEOUT_MINIMUM if 0)
The maximum timeout (defaults to PEER_TIMEOUT_MAXIMUM if 0)
True on success
A snapshot of peer data and statistics. This struct contains a point-in-time copy of peer information. To perform operations on the peer, use the methods which require a Host reference.