Releases: needle-mirror/com.unity.transport
Releases · needle-mirror/com.unity.transport
2.0.0-pre.8
[2.0.0-pre.8] - 2023-03-30
New features
MultiNetworkDriver
can then be used for client drivers too. The restriction on it accepting only listening drivers has been lifted, and it now offers a newConnect
method to connect client drivers. This makes it easier to write networking code that can be shared between server and client.- Added a new
ReliableUtility.SetMaximumResendTime
static method, allowing to modify the maximum resend time of the reliable pipeline at runtime (there's already a similar method for the minimum resend time). Increasing this value can improve bandwidth usage for poor connections (RTT greater than 200ms). - Added the possibility of setting the minimum and maximum resend times of the reliable pipeline through
NetworkSettings
(withWithReliableStageParameters
).
Changes
NetworkEndpoint.TryParse
will now return false and log an error when attempting to parse an IPv6 address on platforms where IPv6 is not supported. The previous behavior was to throw an exception, but only in the editor. On the devices themselves, the address would be successfully parsed silently, which would lead to confusing socket errors down the line.- The
SimulatorUtility.Context
structure has been made internal. It contained only implementation details, or values that appeared useful but were actually either misleading or broken. - The
RelayMessageType
enum has been made internal. The only purpose of this type was to list the different messages of the Relay protocol, which is an implementation detail that should not be relevant to users.
Fixes
- Fixed an issue where calling
ScheduleFlushSend
before the socket was bound would still result in socket system calls being made, resulting in errors being logged. - No warning will be printed when attempting to send on a WebSocket connection that has been closed by the remote peer (would only happen if calling
ScheduleFlushSend
).
1.3.3
[1.3.3] - 2023-03-17
Fixes
- Fixed an issue where calling
ScheduleFlushSend
before the socket was bound would still result in socket system calls being made, resulting in errors being logged.
2.0.0-pre.7
[2.0.0-pre.7] - 2023-03-15
New features
- Added a new
MultiNetworkDriver
API to make it easier to handle multipleNetworkDriver
instances at the same time for cross-play scenarios. Refer to the "cross-play support" section of the documentation for more details on this feature. This new API is also showcased in a new "CrossPlay" package sample.
Changes
- Update Burst dependency to 1.8.3.
- The
QueuedSendMessage
structure was removed as it didn't serve any purpose anymore. - The
dependency
argument ofNetworkDriver.ScheduleFlushSend
is now optional. SequenceHelpers
,RandomHelpers
, and the extensions inNativeListExt
andFixedStringExt
have all been made internal. These are all internal helper classes that shouldn't have been part of the public API in the first place.- Many APIs and types inside
ReliableUtility
have been made internal (among them all APIs and types dealing with send/receive contexts and packet information and timers). The information they contain was meant purely for internal consumption in the first place. The statistics and RTT information inside the shared context remains public. - Removed
errorCode
fromReliableUtility.SharedContext
. Any useful information it can provide is already returned by higher-level APIs likeNetworkDriver.EndSend
. - Default send and receive queue sizes are now set to 512 packets (previous value was 64). The queue sizes are modifiable with
NetworkSettings.WithNetworkConfigParameters
.
Fixes
- Fixed a possible exception in
IPCNetworkInterface
if it was fed an unknown endpoint. - Fixed
NetworkDriver.GetLocalEndpoint
when usingWebSocketNetworkInterface
(note that on web browsers this will now print a warning since local endpoints are not available on WebGL).
1.3.2
[1.3.2] - 2023-03-09
Fixes
- Fixed issue where UWP Xbox builds were crashing because the split buffer fix was not including UWP defines.
- Fixed an issue where
IPCNetworkInterface
would perform useless work for each packet received. - Fixed an issue where
ReliableSequencedPipelineStage
could end up duplicating packets when sending reliable packets while the send queue is full.
2.0.0-pre.6
[2.0.0-pre.6] - 2023-01-13
New features
- Added a
NetworkConnection.ToFixedString
method to allow logging network connections from Burst.
2.0.0-pre.5
[2.0.0-pre.5] - 2023-01-12
Changes
- Revert to Collections 2.1.0-pre.6 as pre.7 is not promoted yet.
[2.0.0-pre.4] - 2023-01-12
Changes
- Update Burst dependency to 1.8.2.
- Update Collections dependency to 2.1.0-pre.7.
- The
InternalId
andVersion
properties ofNetworkConnection
are now internal. These referred to internal values and using them directly was error-prone since values could be reused across connections. To compare connections reliably, compare theNetworkConnection
objects directly (they implement all the relevant operators and interfaces). - Replace
NetworkDriverIdentifierParameter
(andWithNetworkDriverIdentifierParameters
) with a more generalLoggingParameter
(andWithLoggingParameters
). Note that currently these parameters don't affect anything, and are there for future use only.
1.3.1
[1.3.1] - 2022-12-09
Changes
- It is now possible to set a window size of up to 64 for
ReliableSequencedPipelineStage
(useNetworkSettings.WithReliableStageParameters
to modify the value). Doing so increases the packet header size by 4 bytes though, so the default value remains at 32.
Fixes
- Fixed an issue where if one end of a reliable pipeline stopped sending any traffic and its latest ACK message was lost, then the other end would stall.
- Fixed a crash when using DTLS if an update was delayed for long enough that both the disconnection and heartbeat timeouts expire.
2.0.0-pre.3
[2.0.0-pre.3] - 2022-11-29
Changes
- It is now possible to set a window size of up to 64 for
ReliableSequencedPipelineStage
(useNetworkSettings.WithReliableStageParameters
to modify the value). Doing so increases the packet header size by 4 bytes though, so the default value remains at 32. - The Soaker and Pipeline samples were removed in an effort to streamline the samples offered with the package.
Fixes
- Fixed an issue where following an IP address change, the connection to the Relay server would not be re-established properly because of a malformed bind message.
- Fixed an issue where connecting to a Relay server on WebGL builds would fail with a
SocketException
. - Fixed an issue where an
InvalidOperationException
would be thrown when hosting on WebGL even if using Relay (the exception should only be thrown when not using Relay).
2.0.0-pre.2
[2.0.0-pre.2] - 2022-11-11
Changes
- The return code of
NetworkDriver.Bind
andNetworkDriver.Listen
is now a proper value from theError.StatusCode
enum, instead of a seemingly random negative value. - If the connection to the Relay server fails (e.g. the DTLS handshake fails), then the connection status returned by
NetworkDriver.GetRelayConnectionStatus
will now beAllocationInvalid
. It used to remainNotEstablished
which would leave no way for a user to determine that the connection had failed. - Status codes
NetworkHeaderInvalid
andNetworkArgumentMismatch
are now marked as obsolete. Nothing in the API returns these status codes anymore.
Fixes
- Fixed
IndexOutOfRangeException
when connecting a driver configured with IPC interface and Relay. This case is not valid and now fails with aInvalidOperationException
when the driver is created. - Fixed a crash on Android when using the Mono backend.
2.0.0-exp.8
[2.0.0-exp.8] - 2022-10-28
New features
- Support for the
com.unity.logging
package has been added. If the package is installed, logs will go through its default logger instead of the classicUnityEngine.Debug
mechanism. - A new
FixedPEMString
type is introduced to store certificates and private keys in the PEM format.WithSecureClientParameters
andWithSecureServerParameters
fromNetworkSettings
now accept certificates and private keys in this format instead ofFixedString4096Bytes
. It is still recommended to use thestring
-based versions, however.
Changes
- It is not necessary anymore to configure the hostname with
NetworkSettings.WithSecureClientParameters
when using secure WebSockets connections to the Relay server. - Fields have been renamed in the
SecureNetworkProtocolParameter
structure:Pem
is nowCACertificate
,Rsa
is nowCertificate
, andRsaKey
is nowPrivateKey
. Note that directly using this structure is not recommended.WithSecureClientParameters
andWithSecureServerParameters
fromNetworkSettings
are the preferred ways of configuring encryption parameters. - The
SecureNetworkProtocolParameter
structure now stores certificates and private keys asFixedPEMString
instead ofFixedString4096Bytes
, which allows for certificates larger than 4KB. NetworkSettings.WithSimulatorStageParameters
now provides default values for parametersmaxPacketSize
andapplyMode
. The defaults are respectively the MTU size, and to apply the simulator in both directions (send/receive).
Fixes
- Fixed Websockets sending ping messages when the
HeartbeatsTimeout
parameter is disabled (set to0
). - Fixed an issue with secure WebSockets where a connection would fail to be established if the end of the TLS handshake and beginning of the WebSocket handshake arrived in the same message.
- It is now possible to pass certificates larger than 4KB to
WithSecureClientParameters
andWithSecureServerParameters
fromNetworkSettings
. - Fixed an issue where if one end of a reliable pipeline stopped sending any traffic and its latest ACK message was lost, then the other end would stall.