Lee Salzman
657eaf97d9
fragment fixes
CMake / CMake macos-latest Debug (push) Has been cancelled
CMake / CMake ubuntu-latest Debug (push) Has been cancelled
CMake / CMake windows-latest Debug (push) Has been cancelled
CMake / CMake macos-latest Release (push) Has been cancelled
CMake / CMake ubuntu-latest Release (push) Has been cancelled
CMake / CMake windows-latest Release (push) Has been cancelled
2024-11-14 00:50:03 -05:00
Arvid Norlander
7c07702b97
Fix undefined behaviour with signed left shift in fragment calculations ( fixes #256 ) ( #257 )
...
Co-authored-by: Arvid Norlander <arvid-norlander@users.noreply.github.com>
2024-06-10 11:54:11 -04:00
Arvid Norlander
c44b7d0f7f
Fix unaligned reads and writes of the checksum ( fixes #237 ) ( #238 )
...
Co-authored-by: Arvid Norlander <arvid-norlander@users.noreply.github.com>
2024-03-05 10:46:29 -05:00
Lee Salzman
2a85cd6445
better partial message handling
2023-07-23 21:05:47 -04:00
Lee Salzman
8ae0e85298
update connecting peer's mtu from host's current mtu
2023-04-01 14:49:22 -04:00
Ralph Sennhauser
4faa11a243
Fix MTU negotiation on server side
...
On connect the MTU sent by the client gets stored and sent back
unchanged if within minimum and maximum of the protocol. Then on verify
connect a test is done if the returned MTU is smaller than the current
MTU and if so gets adjusted. So as long as the MTU is within boundaries
only the client specified MTU is relevant.
This patch adds a check for smaller MTU on server side.
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2023-03-10 09:41:55 +01:00
Lee Salzman
be7cefa39c
avoid explicitly storing roundTripTimeoutLimit
2023-02-05 00:55:34 -05:00
Lee Salzman
9dde91d003
remove unnecessary sent unreliable list from peers
2023-02-04 23:20:39 -05:00
Lee Salzman
ca18dfb8f8
avoid revisiting peers when continuing to send
2023-02-04 22:48:18 -05:00
Lee Salzman
d7e5470cf7
maintain a separate queue for outgoing send reliable packets
2023-02-04 22:16:19 -05:00
Lee Salzman
4f8e9bdc4c
use a hard-coded crc32 table
2022-08-12 08:46:05 -04:00
Lee Salzman
0286dcdb34
silence some MSVC warnings
2021-04-25 23:44:51 -04:00
Lee Salzman
4de13a2c2e
avoid sending packets in unacknowledged window
2020-11-13 00:11:34 -05:00
Lee Salzman
0d1fb32ee8
fix for sending getting too far ahead of receiver
2020-10-19 20:21:04 -04:00
Lee Salzman
54dac7af81
revert failed throttle changes
2020-09-08 13:39:54 -04:00
Lee Salzman
b63fd5256a
clamp RTT variance a bit more loosely for throttle
2020-09-05 20:29:58 -04:00
Lee Salzman
65dc0f74d8
round RTT stats before comparing
2020-09-03 17:22:05 -04:00
Lee Salzman
bde113ef56
clamp minimum highest RTT variance
2020-09-01 00:26:10 -04:00
Lee Salzman
e55d226969
more command queuing fixes
2020-08-23 16:45:15 -04:00
Lee Salzman
8d55487767
make throttle more readily accelerate
2020-08-23 16:35:43 -04:00
Lee Salzman
5de0a6f764
make throttle even more tolerant of variance
2020-08-12 15:42:57 -04:00
Lee Salzman
eda26a26d9
clamp throttle variance from below based on RTT percentage
2020-07-24 01:50:34 -04:00
Lee Salzman
47d2e192aa
use unified outgoing command queue for reliable and unreliable commands
2020-07-23 04:42:59 -04:00
Lee Salzman
c25b57b2c1
stabilize packet throttle when RTT variance is low
2020-04-16 00:15:18 -04:00
Lee Salzman
f89e5986d0
don't throttle on first RTT measurement
2020-04-13 19:32:13 -04:00
Maxim
33c7d6903e
Return 0 instead of -1 on enet_protocol_receive_incoming_commands
...
Return 0 instead of -1 on enet_protocol_receive_incoming_commands when nothing received.
This allows the Service loop to continue running and not return an error when there is nothing to do with the socket receive.
From debugging I found sometimes the enet_protocol_receive_incoming_commands returns -1 because simply nothing happened in the 256 for loop.
Other functions like enet_protocol_send_outgoing_commands return 0 when nothing happened.
2020-04-07 11:58:08 +02:00
Lee Salzman
6991632abf
accumulate fractional RTT values
2020-04-04 12:30:54 -04:00
Lee Salzman
b4c427059a
clamp roundTripTime
2020-04-03 03:48:38 -04:00
Lee Salzman
6537dc81f3
make RTT calculations more TCP-like (contributed by Vladimir 'virtul' Ivannikov)
2020-03-03 15:34:06 -05:00
Lee Salzman
b8713bdf88
delay handling of DISCONNECT_LATER until in-flight unreliable packets are sent
2019-01-27 14:46:45 -05:00
lsalzman@gmail.com
7c27a5d5f8
fix window wrap check when sending reliable outgoing commands
2015-03-12 16:25:26 -07:00
lsalzman@gmail.com
9b06a12e71
handle case in bandwidth limit protocol where either incoming or outgoing limits are disabled, but not both
2015-03-09 11:54:01 -07:00
Lee Salzman
6ef4e7d277
limit number of packets that can be received per iteration of protocol loop
2014-09-29 15:49:34 +03:00
Lee Salzman
518144338d
fix maximumWaitingData handling to allow acknowledgements when the packet already exists
2014-04-14 21:21:21 +03:00
Lee Salzman
ea8d41f65c
added maximumPacketSize and maximumWaitingData fields for limiting peer buffer space
2014-04-14 19:11:44 +03:00
lsalzman
5721b667f2
avoid an enet_time_get call when timeout expires
2014-02-21 11:20:20 +02:00
lsalzman
84a4ac70ab
handle disconnects in connecting state
2013-11-27 16:33:09 +02:00
Lee Salzman
d45b44f2b5
allow loopback connections
2013-11-17 20:19:17 +02:00
Lee Salzman
4d7b80152b
small fix for duplicate peers
2013-08-18 17:20:17 +03:00
lsalzman
1658cf3a95
stub out enet_host_random_seed()
2013-08-09 09:41:57 +03:00
Lee Salzman
2d2440053d
typo fix
2013-05-12 11:04:00 +03:00
Lee Salzman
69b98608e5
track the number of connected peers to make throttling a bit cheaper
2013-05-11 21:53:55 +03:00
Lee Salzman
7dc0189ffb
handle EINTR in enet_socket_wait
2013-05-10 17:49:44 +03:00
Lee Salzman
714f40319a
set unused reliable sequence number field for acks to sane value
2013-03-23 17:22:32 +02:00
lsalzman
db685c3d4f
only use perror if ENET_DEBUG defined
2013-03-19 11:26:54 +02:00
lsalzman
4ce4aac149
added ENET_PACKET_FLAG_SENT to indicate that a packet has been sent
2013-02-27 16:29:22 +02:00
Lee Salzman
9185dc80bc
state handling cleanups
2013-01-07 20:46:31 +02:00
lsalzman
2d979ceb51
intercept callback support
2012-10-02 13:33:07 +03:00
Lee Salzman
0e0ace781b
merging some things from Ryan C. Gordon (icculus):
...
enet_socket_connect() shouldn't fail with non-blocking sockets.
Removed unused variable.
Sanity check for possible NULL dereference reported by clang's static…analysis.
Added an interface to shutdown().
Fixed typo in the comments.
2012-09-18 16:38:10 +03:00
Lee Salzman
74d4c4a88f
fix serialization of mtu in verify connect packet
2012-09-18 15:29:11 +03:00