|
@@ -3856,7 +3856,7 @@ extern "C" {
|
|
|
* @param pingInterval the interval at which to send pings; defaults to ENET_PEER_PING_INTERVAL if 0
|
|
|
*/
|
|
|
void enet_peer_ping_interval(ENetPeer *peer, enet_uint32 pingInterval) {
|
|
|
- peer->pingInterval = pingInterval ? pingInterval : ENET_PEER_PING_INTERVAL;
|
|
|
+ peer->pingInterval = pingInterval ? pingInterval : (enet_uint32)ENET_PEER_PING_INTERVAL;
|
|
|
}
|
|
|
|
|
|
/** Sets the timeout parameters for a peer.
|
|
@@ -3877,9 +3877,9 @@ extern "C" {
|
|
|
*/
|
|
|
|
|
|
void enet_peer_timeout(ENetPeer *peer, enet_uint32 timeoutLimit, enet_uint32 timeoutMinimum, enet_uint32 timeoutMaximum) {
|
|
|
- peer->timeoutLimit = timeoutLimit ? timeoutLimit : ENET_PEER_TIMEOUT_LIMIT;
|
|
|
- peer->timeoutMinimum = timeoutMinimum ? timeoutMinimum : ENET_PEER_TIMEOUT_MINIMUM;
|
|
|
- peer->timeoutMaximum = timeoutMaximum ? timeoutMaximum : ENET_PEER_TIMEOUT_MAXIMUM;
|
|
|
+ peer->timeoutLimit = timeoutLimit ? timeoutLimit : (enet_uint32)ENET_PEER_TIMEOUT_LIMIT;
|
|
|
+ peer->timeoutMinimum = timeoutMinimum ? timeoutMinimum : (enet_uint32)ENET_PEER_TIMEOUT_MINIMUM;
|
|
|
+ peer->timeoutMaximum = timeoutMaximum ? timeoutMaximum : (enet_uint32)ENET_PEER_TIMEOUT_MAXIMUM;
|
|
|
}
|
|
|
|
|
|
/** Force an immediate disconnection from a peer.
|