Releases: jfriesne/muscle
Releases · jfriesne/muscle
9.50 Release
9.50 - Released 12/31/2024
- Added the IncrementalHashCalculator class and related utility
functions, in util/IncrementalHashCalculator.{cpp,h}. - Added an optional (withSpaces) argument to the HexBytesToString()
and ByteBuffer::ToHexString() methods. - Added Base64Encode() and Base64Decode() functions to
MiscUtilityFunctions.{cpp,h}, based on John Walker's Base64 code. - Added WebSocketDataIOGateway.{cpp,h} to the iogateways folder.
- Added optional (runUntil) and (optRetNextPulseTime) arguments to
ReflectServer::ServerProcessLoop(), to facilitate periodically
pumping the event loop manually from a higher-level event-loop. - Added a dummy/no-op implementation to the SocketMultiplexer class.
Specify -DMUSCLE_USE_DUMMYNOP on the compile line to use it. - Added an EmscriptenReflectServer class to the platform/emscripten
folder, to support driving an event loop from async callbacks. - Added an EmscriptenWebSocketDataIO class to the platform/emscripten
folder, to support network I/O via the Emscripten WebSocket API. - Added an EmscriptenAsyncCallback class to the platform/emscripten folder,
to manage Emscripten's non-cancellable async callbacks. - Added an EmscriptenCallbackMechanism to the platform/emscripten folder.
- Split the StringMatcher constructor in two, so that implicit
construction of a StringMatcher from a String argument can happen. - Renamed ParseHexBytes() to HexBytesFromString(), and updated it
to also handle hex-strings without spaces (e.g. "015A2B66"). - The Thread class now automatically disables its messaging-sockets
option when compiling with Emscripten, since WebAssembly doesn't
currently support socket-pair signalling anyway. - Fixed a bug in HashtableIterator's move-operator that could cause
a moved-into HashtableIterator not to point to the expected content. - Fixed CMakeLists.txt not to include minizip.c and miniunz.c in
the compiled muscle library. - ParseFile() was incorrectly returning B_BAD_ARGUMENT when an
empty String was passed to it. Fixed.
9.44 Release
9.44 - Released 12/16/2024
- Added an optional human-readable name field to ReaderWriterMutex.
- Added a GetInsecurePseudoRandomNumber() function to MiscUtilityFunctions,
just to minimize the number of direct calls to rand(). - Added a move-assignment-operator, a move-constructor, and a
SwapContents() method to the HashtableIterator class. - Added a move-assignment-operator and a move-constructor to the
DemandConstructedObject class. - Added std_move_if_available() and std_forward_if_available() macros
so I can use those calls without breaking pre-C++11 compatibility. - Added a Plunder() method to the Queue class, and updated the move-ctor
and move-assignment-operators to use it.
- Tagged a few non-NULL-returning functions with MUSCLE_NEVER_RETURNS_NULL.
- BitChord::IsBitSet() now just returns false when passed an invalid
argument, rather than triggering an assertion failure. - PointerAndBits::IsBitSet() now just returns false when passed an invalid
argument, rather than triggering an assertion failure. - Tagged some more methods with MUSCLE_NEVER_RETURNS_NULL where appropriate.
- The resource-tallying in AbstractReflectSessions::PrintSessionsInfo()
wasn't working correctly. Fixed. - Applied fixes for various Coverity warnings.
- Fixed a couple of file-handle leaks in SpawnDaemonProcess().
- Fixed a use-after-free error in MiniMessage's MMMoveField() function.
9.43 Release
9.43 - Released 11/22/2024
- Added GetKeyBefore() and GetKeyAfter() convenience-methods to
the Hashtable class. - Added a Message::BytesMightContainFlattenedMessage() convenience method
for quick-and-dirty sanity-checking of flattened-Message bytes. - Added SetCompleteWriteRequired() and IsCompleteWriteRequired() methods
to the DataFlattener class. - Added a PR_MAX_CHILDREN_PER_NODE parameter to the server's parameter set.
This can be used to enforce a maximum-children-per-DataNode limit. - Added B_RESOURCE_LIMIT error code (for when we've hit an application-
defined limit to the amount of resources we are willing to consume)
- Removed the DataFlattener::MarkWritingComplete() method as it turned
out not to be very RAII-friendly. - Fixed a bug in MiniPacketTunnelIOGateway that could cause it to
occasionally crash with an assertion failure.
9.42 Release
9.42 - Released 10/15/2024
- Under MacOS, GetNetworkInterfaceInfos() will now populate the
NetworkInterfaceInfo class's description field with the String
returned by SCNetworkInterfaceGetLocalizedDisplayName(), if possible. - Added a (returnAllBitsSet) optional parameter to BitChord::ToString().
- Added a ReaderWriterMutex class and associated ReadOnlyMutexGuard
and ReadWriteMutexGuard RAII-helper-classes. - Added a testreaderwritermutex.cpp test to the tests folder to
unit-test the new ReaderWriterMutex class. - Added a deleted move-constructor to the HashtableIterator class
so that creation of a HashtableIterator bound to a temporary
object now becomes a compile-time error under C++11 or later. - Added muscle-by-example documentation and examples for the new
ReadOnlyMutexGuard classes. - Added a rwdeadlock.cpp program to the tools folder, to test
the deadlock-finder code's integration with the ReaderWriterMutex classa.
- Fixed typo in Thread.h that would break pre-C++11 builds.
- Fixed the deadlock finder code to handle TryLock()/Unlock() pairs
appropriately (a TryLock() call is non-blocking so can't cause deadlock)
9.41 Release
9.41 - Released 8/19/2024
- Added a MUSCLE_NEVER_RETURNS_NULL macro that can be used to tag functions
or methods that will never return a NULL pointer under any circumstances
(to enable a compiler warning when their caller tests against NULL) - Added a WITH_TAGGED_POINTERS option to the CMakeLists.txt. Defaults to ON.
- Added support for -DWITH_OBJECT_COUNTING=ON to the CMakeLists.txt.
- Modified StorageReflectSession::CloneDataNodeSubtree() to no longer set
the SETDATANODE_FLAG_DONTOVERWRITEDATA flag when recursing to children.
That way, it can be used to update existing subtrees as well as create
new ones. - Rewrote the PathMatcher class so that it now stores patterns of
different lengths in separate tables, rather than all together in a
single table. That way it's possible to efficiently access only the
patterns that are relevant for a given node-depth, without having to
iterate past all of the irrelevant ones every time. - Added DECLARE_COUNTED_OBJECT tags to the PathMatcher, NodePathMatcher,
StringMatcher, and StringMatcherQueue classes. - Updated DataNode ctor to default-initialize member-variables rather
than relying on Init() to do that (since other methods could get called
before Init() gets called, in some cases) - Removed the deprecated constant PR_NAME_SET_QUIETLY. (Use the
SETDATANODE_FLAG_QUIET SetDataNodeFlag instead) - Modified a number of Ref-returning methods to return (const Ref &)
instead, for better performance and so that they can be called inline
without causing clang-tidy to worry about potential use-after-free issues. - Modified the PointerAndBits class to hold a real pointer and not a
uintptr when the -DMUSCLE_AVOID_TAGGED_POINTERS compiler-flag is set. - Moved the va_list property out of the LogCallbackArgs class and into
a separate argument to LogCallback::Log(), so that we don't have to
deal with va_list's weird restrictions regarding object-lifetimes. - Removed all setter methods from LogCallbackArgs class to make it immutable.
- Changed the Set*() methods in SysLog.h to return void instead of status_t.
- Fixed a number of warnings reported by clang-tidy.
9.40 Release
9.40 - Released 6/24/2024
- Added a MUSCLE_STATIC_ASSERT_ARRAY_LENGTH macro to support/MuscleSupport.h
so that array declarations can error out at compile time if they don't
contain the expected number of values. - Added a DECLARE_LABELLED_BITCHORD_FLAGS_TYPE macro to support/BitChord.h
so that BitChord::ToString() can return human-readable bit-labels if desired. - Added GetBitLabel() and ParseBitLabel() methods to the BitChord class.
- DefaultConsoleLogger now checks for a MUSCLE_LOG_TO_STDERR environment
variable on startup, and if one is present, it will force all Log()
and LogTime() output to stderr. This is useful in cases where the
parsing of the "logtostderr" command line argument doesn't happen
soon enough to prevent all output to stdout. - Added GetCenter() and CenterTo() methods to the Rect class.
- Added | operators to the Rect class that take a Point as an argument.
- Added a Rect::IsRational() method.
- Renamed the non-const x() and y() methods of the Point class to
SetX()/SetY(), to better match the style of the other classes. - Added GetX() and GetY() methods to the point class, for consistency.
- Renamed Rect::Width() to Rect::GetWidth()
- Renamed Rect::Height() to Rect::GetHeight()
- Renamed Rect::IntegerWidth() to Rect::GetWidthAsInteger()
- Renamed Rect::IntegerHeight() to Rect::GetHeightAsInteger()
- Updated PointerAndBits.h to disable tagged-pointers on 32-bit systems,
since we can't guarantee that a heap-pointer's high bit won't be
legitimately set for heap objects on those systems. - Changed the windows implementation of muscleSprintf() to use the
templated inline function used on other OS's, as the old macro-based
implementation wasn't playing nice with explicit namespaces prefixes. - Changed the implementation of muscleFopen() to use inline functions
instead of macros for better namespace behavior. - Changed the implementation of muscleStrcpy() to use templates
to enforce memory-safery, instead of just being a macro. - Added a work-around to Hashtable.h to avoid a spurious compile-time
error regarding std::atomic under MSVC2017 and earlier. - Fixed handling of the head=numbytes argument in the snoopsharedmem tool.
9.37 Release
9.37 - Released 5/2/2024
- Implemented the ustar extension in TarFileWriter to support file paths
and linked-file paths up to 256 characters in length. - Implemented the pax extension in TarFileWriter to support file paths
and linked-file paths of unlimited length. - Added CPut*() convenience methods to the Python Message class.
- Updated the snoopsharedmem to use more sophisticated argument parsing.
- Updated the snoopsharedmem to have "delay=N" and "clear" options.
- Added a GetThreadPriorityName() convenience-method to the Thread class.
- Added a MUSCLE_AVOID_THREAD_PRIORITIES flag that can be added to the
compile-line to turn all set-thread-priority calls into no-ops. - Added SetThreadScheduler()/GetThreadScheduler()/GetThreadSchedulerName()
methods to the Thread class to support Linux's SCHED_FIFO, etc.
- Updated the Python2 and Python3 message.py classes so that GetFieldItem()
and the Get*() methods now take an optional (defaultValue) argument that
specifies what should be returned if the requested item is not present
in the Message. - Removed the option for MUSCLE_NODISCARD macro to expand to
__attribute__((warn_unused_result))
under pre-C++17 codebases,
as that implementation warns even when an explicit (void) cast
is employed, causing too much visual noise to be useful. - Replaced calls to newnothrow with calls to new, to simplify the
code given fact that in modern OS's newnothrow's successful return
doesn't actually mean the RAM is available anyway. - Added RoundUp() versions of all the TimeUnitConversion functions
(e.g. added MicrosToMillisRoundUp() to complement MicrosToMillis()) - Modified the MUSCLE_USE_POLL and MUSCLE_USE_EPOLL implementations of
SocketMultiplexer to round up to the nearest millisecond when computing
timeout-times (instead of rounding down, since slightly-early-wakeups
are worse than slightly-late-wakeups)
9.36 Release
9.36 - Released 3/6/2024
- Added GetMostRecentInputTimeStamp() and GetMostRecentOutputTimeStamp()
methods to the AbstractReflectSession class - Added a GetMostRecentAcceptTimeStamp() method to the
ReflectSessionFactory class. - Added a GetAcceptCount() method to the ReflectSessionFactory class.
- PrintSessionsInfo() now includes text describing how recently
each session has sent or received data. - PrintFactoriesInfo() now includes text describing how recently
each factory has accepted an incoming TCP connection, and how
many connections the factory has received so far. - Added a GetClientDescriptionString() virtual method to the
AbstractReflectSession class to support more-useful debug output. - Added a GetSocketBindAddress() function to NetworkUtilityFunctions.h
for querying where a socket is bound to on the local machine.
- Renamed GetPeerIPAddress() to GetPeerAddress(), and changed it
to return an IPAddressAndPort instead of returning an IPAddress
and also using a separate (optPort) argument. - Tweaked zlib/zlib/zconf.h so that the gzlib files can build
successfully even if ./configure wasn't called in the
zlib/zlib folder first. - SocketMultiplexer::RegisterSocket() now emits an error message
to the log if a file descriptor is too large to pass to FD_SET(). - Updated build instructions to specify cmake instead of
Visual Studio
9.35 Release
9.35 - Released 2/14/2024
- Added an optional (optRunAsUser) argument to the various
process launch methods in ChildProcessDataIO. - Added convenience constructors to the IPAddress class
that take an in_addr or in6_addr as an argument. - Added convenience constructors to the IPAddressAndPort class
that take a sockaddr_in or sockaddr_in6 as an argument. - Added WriteToInAddr() and WriteToIn6Addr() convenience
methods to the IPAddress class. - Added WriteToSockAddrIn() and WriteToSockAddrIn6()
convenience methods to the IPAddressAndPort class. - Added convenience overloads of the SendDataUDP() and
ReceiveDataUDP() functions that take an IPAddressAndPort
as their source/destination argument. - Added method IPAddress::IsIPv6LinkLocal().
- Changed ChildProcessDataIO::ChildProcessReadyToRun() to
be protected instead of public. - Removed ip_address typedef; use IPAddress instead.
- Tweaked Inet_NtoA() so that when called with the (preferIPv4)
flag, it will return the invalid/all-zeroes IP address string
as "" rather than "::". - Updated TarFileWriter to handle it a little more elegantly
when a file's length changes while the tar data is being written
out to a non-seekable DataIO. - Fixed a bug in the Ref class that would cause a NULL Ref's
status-string to be returned as "OK" rather than "NULL Ref" - BitChord::SetByte()'s second argument was the wrong type. Fixed.
v9.34
9.34 - Released 12/18/2023
- Added an optional localnicip=local.nic.ip.address argument
to hexterm, to better support sending IPv4 multicast packets. - Added a B_SHUTTING_DOWN error code, useful for returning
from Thread::MessageReceivedFromOwner() overrides if there
isn't any real error but the internal thread is exiting on
request. - Added a templated GetConstRefToDefaultObjectForType()
convenience function to util/RefCount.h - Added a GetHardLinkCount() method to the FilePathInfo class.
- Modified IsRegexToken() to return false for '-', since
hyphens aren't meaningful except in the context of
"character class" regex tokens (which will get escaped anyway). - Replaced the IsHosed() and SetHosed() methods of the
AbstractMessageIOGateway class with more descriptive methods
GetUnrecoverableErrorStatus() and SetUnrecoverableErrorStatus().