v2.1.0 Release Notes
Install this version with Unity's Package Manager using the following URL (step-by-step instructions):
https://github.com/RiptideNetworking/Riptide.git?path=/Packages/Core#2.1.0
It can also be installed a number of other ways for use outside of Unity, including as a NuGet package.
For a full list of source code changes, check out the version comparison on GitHub.
Additions
- Added the "notify" message send mode and overhauled message sequencing (PR #109).
- Added support for reserving (when writing) and skipping (when reading) bits in a message via
ReserveBits
andSkipBits
, respectively (#103). - Added support for setting and retrieving specific ranges of bits in a message, regardless of its internal write and read positions via
SetBits
andPeekBits
, respectively. Use these with care, as accidentally setting or peeking bits in an incorrect range or at an incorrect position will scramble your data. - Added support for adding bits to a message via
AddBits
. - Added support for adding data to a message directly from another existing message via
AddMessage
. - Added support for adding values to a message using a variable amount of bits (based on how large the value is) via
AddVarLong
/AddVarULong
. - Added an option to disable the
[MessageHandler]
attribute-based message handler system via theuseMessageHandlers
parameter in theServer.Start
&Client.Connect
methods. This is useful if you prefer to handle messages via theServer.MessageReceived
&Client.MessageReceived
events. - Added an option to set timeout time per
Connection
. - Added an option to specify the IP address that
UdpServer
andTcpServer
should listen on (#26 and #79). - Added the
Connection.ReliableDelivered
event for when a reliably sent message is successfully delivered (#42). - Added bandwidth-related
Connection.Metrics
(#77). - Added
Reason
toConnectionFailedEventArgs
. - Added the
Server.ConnectionFailed
event for when a pending connection fails (#104). - Added error logs for when the incorrect
Create
overload is used (#113).
Changes
- Made the
Message
class operate on the bit-level instead of the byte-level. This allowed for a slightly reduced message header size and gives you more control over how much data you're sending (PR #121). - Made poor connection quality trigger disconnections. This can be finely controlled via the
Connection
class'sMaxAvgSendAttempts
,AvgSendAttemptsResilience
,MaxSendAttempts
,MaxNotifyLoss
, andNotifyLossResilience
fields, or disabled entirely by settingCanQualityDisconnect
tofalse
. - Deprecated the
Message
class'sReadLength
,UnreadLength
, andWrittenLength
properties. UseReadBits
,UnreadBits
, andWrittenBits
instead. - Changed
Message.MaxPayloadSize
setter's error logs to exceptions. - Disabled Nagle's algorithm in the TCP transport.
- Removed the unnecessary 65 second limit on
Connection.TimeoutTime
andPeer.HeartbeatInterval
. - Made
PriorityQueue<TElement, TPriority>
publicly accessible and removed its internal use ofList<T>
. - Removed the unnecessary
AckExtra
MessageHeader
type. - Stopped using
DateTime
for calculating timeouts. - Updated DocFX to v2.70.1.
Fixes
- Fixed improper duplicate filtering which allowed duplicates to be handled under certain circumstances (PR #109).
- Fixed unintended processing of subsequent connection attempts from connections that had already been rejected.
- Fixed incorrect processing of new acks for reliable messages.
- Fixed incorrect transport data buffer sizes.
- Fixed incorrect values that were used in some of the
Message
class's error messages. - Fixed the size of
PendingMessage
s not being changed along withMessage.MaxPayloadSize
. - Fixed incorrect "unknown reason" rejection log when an already-connected connection was rejected (#84).
- Fixed errors that occurred when various
Server
properties were accessed before the first player connected (#86). - Fixed the TCP transport's improper handling of large packets (#92).
- Fixed unhandled
SocketException
s when sending data, such as the one that occurred when aClient
with no internet connection attempted to connect (#102). - Fixed unintended timeout when a
Client
would disconnect and reconnect again in quick succession (#105). - Fixed an infinite loop when a
Server
was started with amaxClientCount
of 65,535 (#111). - Fixed an issue with the TCP transport that caused connections to be rejected shortly after they were accepted and fully connected (similar to SteamTransport#1).
Sponsor Shoutout
Thank you so much to all of my GitHub Sponsors for helping to make this update possible by financially supporting the project!