diff options
author | eihrul <eihrul> | 2007-07-13 03:25:16 +0000 |
---|---|---|
committer | eihrul <eihrul> | 2007-07-13 03:25:16 +0000 |
commit | 57bb5e87bcc41400b49ec645ce8eb4b00f2c2c34 (patch) | |
tree | b1ef5bc0adebdf64adc64192ea13b58832908898 | |
parent | 18df9486dcd1aa62ca0b3b0b342f0563930171a2 (diff) | |
download | enet-57bb5e87bcc41400b49ec645ce8eb4b00f2c2c34.tar.gz enet-57bb5e87bcc41400b49ec645ce8eb4b00f2c2c34.zip |
*** empty log message ***
-rw-r--r-- | protocol.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -302,6 +302,12 @@ enet_protocol_handle_connect (ENetHost * host, ENetProtocolHeader * header, ENet currentPeer -> incomingBandwidth == 0) currentPeer -> windowSize = ENET_PROTOCOL_MAXIMUM_WINDOW_SIZE; else + if (host -> outgoingBandwidth == 0 || + currentPeer -> incomingBandwidth == 0) + currentPeer -> windowSize = (ENET_MAX (host -> outgoingBandwidth, currentPeer -> incomingBandwidth) / + ENET_PEER_WINDOW_SIZE_SCALE) * + ENET_PROTOCOL_MINIMUM_WINDOW_SIZE; + else currentPeer -> windowSize = (ENET_MIN (host -> outgoingBandwidth, currentPeer -> incomingBandwidth) / ENET_PEER_WINDOW_SIZE_SCALE) * ENET_PROTOCOL_MINIMUM_WINDOW_SIZE; |