You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: Address packet overflow issues in the UTP adapter (#1403)
* Remove maximum packet size setting
It doesn't mean anything now. Anything sent on fragmented pipelines will
be broken up at 1400 bytes boundaries, and everything sent on a
non-fragmented pipeline is limited to a maximum size of 1400 bytes
(including overhead from the underlying protocols). Allowing to set that
limit can only lead to confusion among users.
* Send all reliable data on a fragmented pipeline
This is not the cleanest of solution, but until we figure out something
better in UTP, this can at least unblock Boss Room.
The core issue being fixed here is that we'd allow sending payloads up
to the MTU in size on a non-fragmented pipeline. But that's incorrect
since UTP must add its own overhead to the payload. If sending a payload
close to the MTU in size, the overhead would bring the total packet size
over the limit of the MTU.
Since UTP lacks a good way of figuring out what's the actual maximum
payload size that can be sent, for now we patch over the issue by
sending everything on a fragmented pipeline.
The exception is the unreliable messages. The fragmentation pipeline
doesn't cleanly handle having multiple fragmented payloads in flight
(and possibly arriving out of order). The reliable pipeline stage fixes
that, but for unreliable traffic it's better not to fragment it.
* Update adapter's CHANGELOG to reflect latest fixes
* Set baselib's maximum payload size to its default
Which is 2000 bytes. We won't need to hardcode that default value when
the new NetworkSettings API lands. So having a magical number floating
like that in the code is a temporary thing.
Copy file name to clipboardExpand all lines: com.unity.netcode.adapter.utp/CHANGELOG.md
+10Lines changed: 10 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,16 @@
1
1
# Changelog
2
2
All notable changes to this package will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
3
3
4
+
## [Unreleased]
5
+
6
+
### Changed
7
+
8
+
- Removed 'Maximum Packet Size' configuration field in the inspector. This would cause confusion since the maximum packet size is in effect always the MTU (1400 bytes on most platforms).
9
+
10
+
### Fixed
11
+
12
+
- Fixed packet overflow errors when sending payloads too close to the MTU (was mostly visible when using Relay).
0 commit comments