aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorLee Salzman <[email protected]>2013-05-11 21:53:55 +0300
committerLee Salzman <[email protected]>2013-05-11 21:53:55 +0300
commit69b98608e5fb48160947807256ea53f5574dae37 (patch)
tree5f654f4bd2e80ef6ce82333a3425cae2672d1da7 /include
parent2bb83d9813bf013b63a6b7818893dd375bd84118 (diff)
downloadenet-69b98608e5fb48160947807256ea53f5574dae37.tar.gz
enet-69b98608e5fb48160947807256ea53f5574dae37.zip
track the number of connected peers to make throttling a bit cheaper
Diffstat (limited to 'include')
-rw-r--r--include/enet/enet.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/enet/enet.h b/include/enet/enet.h
index 7bd10da..07ed9d2 100644
--- a/include/enet/enet.h
+++ b/include/enet/enet.h
@@ -383,6 +383,8 @@ typedef struct _ENetHost
enet_uint32 totalReceivedData; /**< total data received, user should reset to 0 as needed to prevent overflow */
enet_uint32 totalReceivedPackets; /**< total UDP packets received, user should reset to 0 as needed to prevent overflow */
ENetInterceptCallback intercept; /**< callback the user can set to intercept received raw UDP packets */
+ size_t connectedPeers;
+ size_t bandwidthLimitedPeers;
} ENetHost;
/**
@@ -566,6 +568,8 @@ extern ENetIncomingCommand * enet_peer_queue_incoming_command (ENetPeer *, const
extern ENetAcknowledgement * enet_peer_queue_acknowledgement (ENetPeer *, const ENetProtocol *, enet_uint16);
extern void enet_peer_dispatch_incoming_unreliable_commands (ENetPeer *, ENetChannel *);
extern void enet_peer_dispatch_incoming_reliable_commands (ENetPeer *, ENetChannel *);
+extern void enet_peer_on_connect (ENetPeer *);
+extern void enet_peer_on_disconnect (ENetPeer *);
ENET_API void * enet_range_coder_create (void);
ENET_API void enet_range_coder_destroy (void *);