ENetPeer class
An ENet peer which data packets may be sent or received from.
Constructors
-
ENetPeer.parse(Pointer<
ENetPeer> peer) -
Crates a ENetPeer instance by parsing an exitig
bindings.ENetPeer
Properties
- address → ENetAddress
-
Internet address of the peer.
no setter
- channelCount → int
-
Number of channels allocated for communication with peer.
no setter
- connectID → int
-
The unique connection ID for identifying this peer.
no setter
- hashCode → int
-
The hash code for this object.
no setteroverride
- incommingBandwidth → int
-
Downstream bandwidth of the client in bytes/second
no setter
- outgoingBandwidth → int
-
Upstream bandwidth of the client in bytes/second.
no setter
- packetLoss → int
-
mean packet loss of reliable packets as a ratio with respect to the
constant
ENET_PEER_PACKET_LOSS_SCALE
no setter - packetsLost → int
-
The total number of packets lost during communication with this peer.
no setter
- packetsSent → int
-
The total number of packets sent to this peer.
no setter
- packetThrottle → int
-
The current packet throttle for controlling outgoing packet rates.
no setter
- packetThrottleAcceleration → int
-
The acceleration factor for packet throttling.
no setter
- packetThrottleDeceleration → int
-
The deceleration factor for packet throttling.
no setter
- packetThrottleLimit → int
-
The upper limit for packet throttling.
no setter
- pingInterval ↔ int
-
The interval, in milliseconds, between periodic pings to the peer.
getter/setter pair
- reliableDataInTransit → int
-
The total amount of reliable data currently in transit to the peer.
no setter
- roundTripTime → int
-
mean round trip time (RTT), in milliseconds, between sending a reliable
packet and receiving its acknowledgement
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- state → ENetPeerState
-
Tracks the connection lifecycle of a peer.
no setter
- timeoutMaximum → int
-
The maximum time, in milliseconds, before disconnecting the peer due
to no activity.
no setter
- timeoutMinimum → int
-
The minimum time, in milliseconds, before considering the
peer as disconnected.
no setter
- totalWaitingData → int
-
The total amount of data waiting to be sent to the peer.
no setter
Methods
-
disconnect(
{int data = 0}) → void -
Request a disconnection from a peer.
data
- Data describing the disconnection. -
disconnectLater(
{int data = 0}) → void -
Request a disconnection from a peer, but only after all queued
outgoing packets are sent.
data
- Data describing the disconnection. -
disconnectNow(
{int data = 0}) → void -
Force an immediate disconnection from a peer.
data
- Data describing the disconnection. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
ping(
) → void - Sends a ping request to a peer.
-
receive(
int channelID) → ENetPacket? - Attempts to dequeue any ing queued packet.
-
reset(
) → void - Forcefully disconnects a peer.
-
send(
int channelID, ENetPacket packet) → void - Queues a packet to be sent.
-
throttleConfigure(
{int interval = ENET_PEER_PACKET_THROTTLE_INTERVAL, int acceleration = ENET_PEER_PACKET_THROTTLE_ACCELERATION, int deceleration = ENET_PEER_PACKET_THROTTLE_DECELERATION}) → void - Configures throttle parameter for a peer.
-
timeout(
{int timeoutLimit = ENET_PEER_TIMEOUT_LIMIT, int timeoutMinimum = ENET_PEER_TIMEOUT_MINIMUM, int timeoutMaximum = ENET_PEER_TIMEOUT_MAXIMUM}) → void - Sets the timeout parameters for a peer.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override