Cameron Gutman
78cc9b4b03
Only pass the peer's local address if the host was wildcard bound
2026-02-06 23:20:39 -06:00
Cameron Gutman
44c85e1627
Further improve ping interval wait logic
2024-10-20 17:05:36 -05:00
Cameron Gutman
badcd6c01d
Fix waking early to send pings
2024-10-20 16:32:16 -05:00
Cameron Gutman
b757dc7c28
Wake from the socket wait for a peer RTO
2024-10-20 16:16:57 -05:00
Cameron Gutman
9e1cfe280a
Fix -Wsign-compare warning
2024-05-25 17:08:01 -05:00
Cameron Gutman
f6e67b1138
Automatically disable QoS tagging on the server-side too for blackhole router scenarios
...
Also bump the threshold for QoS disablement to 3 losses to avoid unnecessary fallbacks on the server side.
2024-01-31 23:31:04 -06:00
Cameron Gutman
68ffba7d45
Adjust RTO logic to retransmit more quickly on links with high RTT variance
...
Since Moonlight uses ENet for highly latency sensitive but very low bandwidth traffic flows, we'd rather generate a little excess traffic than wait too long to retransmit.
2023-07-30 13:52:25 -05:00
Cameron Gutman
bbed828aae
Cap the retransmit timer at 1/5 of the max peer timeout
...
This helps avoiding spurious disconnections in cases of large RTT variance
2023-07-26 00:57:05 -05:00
Cameron Gutman
bdda0eecc5
Merge remote-tracking branch 'upstream/master' into moonlight
2023-07-25 21:54:49 -05:00
Lee Salzman
2a85cd6445
better partial message handling
2023-07-23 21:05:47 -04:00
Cameron Gutman
4979b629c2
Fix build after removal of roundTripTimeoutLimit
2023-07-08 11:14:46 -05:00
Cameron Gutman
33c726ab73
Merge remote-tracking branch 'upstream/master' into moonlight
2023-07-08 10:59:10 -05: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
Cameron Gutman
e790647a57
Correctly support hosts with multiple possible source addresses
2023-02-12 15:35:34 -06: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
Cameron Gutman
ad5bf95397
fix excessive retransmissions when average RTT variance is 0
2021-05-16 15:35:02 -05:00
Cameron Gutman
ab9d471cec
fix SRTT calculations when RTT < 8 ms and SRTT >= 8 ms
2021-05-16 14:15:38 -05:00
Cameron Gutman
c20ca391e2
fix RTO limit being exceeded
2021-05-14 18:46:49 -05:00
Cameron Gutman
70ce1c3e0b
Merge remote-tracking branch 'upstream/master' into moonlight
2021-04-29 09:40:57 -05:00
Lee Salzman
0286dcdb34
silence some MSVC warnings
2021-04-25 23:44:51 -04:00
Cameron Gutman
d9e561938f
Merge pull request #5 from lsalzman/master
...
Rebase to lsalzman/enet: update to 1.3.17
2021-01-09 18:38:33 -06: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
Cameron Gutman
8d794daa7c
Merge branch 'master' of https://github.com/lsalzman/enet into moonlight
...
# Conflicts:
# unix.c
# win32.c
2020-06-12 21:46:42 -07:00
Cameron Gutman
9bf55a3433
Disable QoS tagging if 2 connect packets in a row are dropped
2020-06-12 21:16:46 -07: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
Cameron Gutman
cf38f85e08
Be more lenient with the expected peer address for multi-homed hosts
2019-09-14 14:05:05 -07:00
Lee Salzman
b8713bdf88
delay handling of DISCONNECT_LATER until in-flight unreliable packets are sent
2019-01-27 14:46:45 -05:00
Cameron Gutman
a39d3bb49c
Wake up every once in a while to see if any retransmissions or pings need to be sent
2016-03-06 14:56:08 -08:00
Cameron Gutman
ae9002fe19
Protocol agnostic socket address to fix IPv6 and remove broadcast support
2016-03-06 14:47:01 -08:00
lsalzman@gmail.com
7c27a5d5f8
fix window wrap check when sending reliable outgoing commands
2015-03-12 16:25:26 -07:00