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
ReserveBitsandSkipBits, respectively (#103). - Added support for setting and retrieving specific ranges of bits in a message, regardless of its internal write and read positions via
SetBitsandPeekBits, 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 theuseMessageHandlersparameter in theServer.Start&Client.Connectmethods. This is useful if you prefer to handle messages via theServer.MessageReceived&Client.MessageReceivedevents. - Added an option to set timeout time per
Connection. - Added an option to specify the IP address that
UdpServerandTcpServershould listen on (#26 and #79). - Added the
Connection.ReliableDeliveredevent for when a reliably sent message is successfully delivered (#42). - Added bandwidth-related
Connection.Metrics(#77). - Added
ReasontoConnectionFailedEventArgs. - Added the
Server.ConnectionFailedevent for when a pending connection fails (#104). - Added error logs for when the incorrect
Createoverload is used (#113).
Changes
- Made the
Messageclass 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
Connectionclass'sMaxAvgSendAttempts,AvgSendAttemptsResilience,MaxSendAttempts,MaxNotifyLoss, andNotifyLossResiliencefields, or disabled entirely by settingCanQualityDisconnecttofalse. - Deprecated the
Messageclass'sReadLength,UnreadLength, andWrittenLengthproperties. UseReadBits,UnreadBits, andWrittenBitsinstead. - Changed
Message.MaxPayloadSizesetter's error logs to exceptions. - Disabled Nagle's algorithm in the TCP transport.
- Removed the unnecessary 65 second limit on
Connection.TimeoutTimeandPeer.HeartbeatInterval. - Made
PriorityQueue<TElement, TPriority>publicly accessible and removed its internal use ofList<T>. - Removed the unnecessary
AckExtraMessageHeadertype. - Stopped using
DateTimefor 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
Messageclass's error messages. - Fixed the size of
PendingMessages 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
Serverproperties were accessed before the first player connected (#86). - Fixed the TCP transport's improper handling of large packets (#92).
- Fixed unhandled
SocketExceptions when sending data, such as the one that occurred when aClientwith no internet connection attempted to connect (#102). - Fixed unintended timeout when a
Clientwould disconnect and reconnect again in quick succession (#105). - Fixed an infinite loop when a
Serverwas started with amaxClientCountof 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!