Skip to content

Releases: jfriesne/muscle

8.46 release

08 Jan 22:38
Compare
Choose a tag to compare

8.46 - Release 1/8/2022

  • Added HashCode() methods to the ByteBuffer, Queue, Hashtable,
    FilePathInfo, muscle_thread_id, and PointerAndBool classes.
  • Added a CalculateHashCode() function that takes an array
    as an argument and returns a hash code for the entire array.
  • Rewrote the deadlock-finder's lock-logging code to use
    a finite amount of RAM rather than an ever-growing amount.
  • Added PrintMutexLockingReport() to print out out the current
    state of the -DMUSCLE_ENABLE_DEADLOCK_FINDER debug-info
    without having to exit the process.
  • Added ToHexString() and ToAnnotatedHexString() methods to
    the ByteBuffer class.
  • Added a suppressLeadingZeroes argument to BitChord::ToHexString()
  • Added a MaxCacheableTableSize template-argument to the
    ImmutableHashtable classes.
  • Added logic to the ImmutableHashtable class to mutate a table
    in some circumstances (when nobody will notice) to avoid
    creating a lot of superfluous interim tables.
  • Added a Hashtable::HasKeysInCommonWith() convenience method.
  • Added a DropAllCacheEntriesContainingAnyOfTheseKeys() method
    to the ImmutableHashtablePool class, for better efficiency.
  • Hashtable::Remove() and Hashtable::Intersect() methods are
    now templated so their argument can be a Hashtable of a
    different type (as long as its KeyType is the same)
  • CalculateHashCode(const Type &) now calls HashCode() on the
    argument if possible, or uses a PODHashFunctor otherwise.
  • Downgraded cmake_minimum_required in the CMakeList.txt files
    to 2.8.12, in order to regain compatibility with older build
    environments
  • Replaced instances of MutexGuard objects manually being
    placed on the stack with DECLARE_MUTEXGUARD() macro invocations,
    for better code-safety and deadlock-finder compatibility.
  • MutexGuard now triggers a crash if its call to Lock() or
    Unlock() its Mutex fails.
  • Removed MutexGuard::IsMutexLocked() since it is no longer
    possible for that method to return false.
  • Added a Mutex::GetNativeMutexImplementation() method for
    accessing the Mutex class's back-end directly, if necessary.
  • Removed deadlockfinder.cpp because its functionality is
    built in to the core MUSCLE library now.
  • Refactored various status_t returning code to use
    MRETURN_ON_ERROR macro instead of manual status-variable
    management, for better readability.
  • Moved various trivial functions out of MiscUtilityFunctions.cpp
    and into SetupSystem.cpp, to reduce linking dependencies.
  • Refactored the Mutex class so that the code associated with
    the -DMUSCLE_ENABLE_DEADLOCK_FINDER deadlock-finding feature
    integrates better with TryLock() and the MutexGuard class.
  • Updated DECLARE_MUTEXGUARD to explicitly specify the muscle
    namespace, so it can be used from other namespaces also.
  • AutoChooseHashFunctor's explicit instantiations neglected
    to declare the Type field as public. Fixed.

8.45 release

21 Dec 21:29
Compare
Choose a tag to compare

8.45 - Release 12/21/2021

  • Added a GetSessionsByIDNumber() method to the ReflectServer
    and ServerComponent clases, for session-lookup with uint32 key.
  • DataNodeSubscribersTable now uses uint32 keys instead of
    String keys, for better efficiency.
  • Inlined some trivial functions in the ReflectServer class.
  • Changed the Python 2 code to use xrange() instead of range().
  • Fixed the Windows implementation of the Directory class
    to work correctly in 64-bit builds.
  • Fixed various MSVC2022 warnings in the muscle-by-example code.
  • Fixed several race conditions reported by ThreadSanitizer.
  • DummyRef and DummyConstRef constructors now inherent the
    IsRefCounting() parameter of their Ref argument verbatim,
    to avoid bugs introduced by implicit-constructor insertion.
  • Updated the PointerAndBool classes to hold their internal
    state as a (uintptr) instead of a (T*), to avoid any
    potential undefined behavior that might arise from holding a
    non-aligned object-pointer.

8.44 release

17 Nov 19:53
Compare
Choose a tag to compare

8.44 - Release 11/17/2021

  • Added new methods ObjectPool::PerformSanityCheck() and
    AbstractObjectRecycler::GlobalPerformSanityCheck() to make
    it easier to detect memory-corruption issues in the future.
  • Improved the robustness of the SimulatedMulticastDataIO's
    distributed-ping algorithm.
  • Added a templated Arg(const T &) method to the String class
    so that you can pass a reference to any object with a
    ToString() method and it will call ToString() on the object
    implicitly.
  • Added templated + and += operators for the String class,
    so you can append an object with a ToString() method without
    having to explicitly call ToString() on it.
  • Merged in Kreeblah's FreeBSD 13.0 compatibility fixes.
  • Fixed a bug in Queue::Clear() that allowed the Queue to remain
    un-normalized in some cases after Clear() returned. This bug
    could in turn cause Message::Unflatten() to corrupt memory.
  • Fixed an MSVC warning in GlobalMemoryAllocator.h about strdup()

8.43 release

25 Oct 20:48
Compare
Choose a tag to compare

8.43 - Release 10/25/2021

  • Added BitChord::GetNumBitsSet() method.
  • Added a Message::SortDataInField() method.
  • Added HasBufferedIncomingText() method to PlainTextMessageIOGateway
  • Added a Hashtable::SwapWithTable() method for swapping a key/value pair.
  • Added a Message::SwapName() method for swapping a named field.
  • The CMakeLists.txt file now supports a WITH_SSL=ON option to
    compile the muscle library with OpenSSL support enabled.
  • Added a second constructor to FileDataIO to allow the call to
    fopen() to be deferred until the first time the calling code
    tries to use the FileDataIO's I/O methods.
  • Added a muscleStrdup() function, for convenience.
  • Added an optional (escapeChar) argument to the StringTokenizer
    class constructors, to allow specifying an escape-character
    that can be inserted before separator-chars that are intended
    to be interpreted as literals.
  • StringTokenizer class now uses a bit-chord lookup rather than
    strchr() when determining if a character is a separator-char.
  • Added String::WithCharsEscaped() to support appropriate
    backslash-insertions before specified "special" chars.
  • Added Split() and Join() convenience-methods to the
    StringTokenizer class, for easy conversion between
    a String and a Queue of sub-strings.
  • Removed the GetHardSeparatorChars() and GetSoftSeparatorChars()
    methods from the StringTokenizer class.
  • Updated the cmake_minimum_required in CMakeLists.txt to 3.0
    to avoid deprecation warnings.
  • Moved PrintSessionsInfo() and PrintFactoriesInfo() up out
    of StorageReflectSession and into AbstractReflectSession.
  • Changed the ComputerIsAboutToSleep() and ComputerJustWokeUp()
    methods of the INetworkConfigChangesTarget interface to be
    implemented as no-ops methods instead of pure-virtual.
  • PlainTextMessageIOGateway::DoInput() now flushes its input
    buffer when it's in flush-partial-incoming-lines mode, even
    when it didn't actually read any more bytes.
  • Fixed a bug in MiniPacketTunnelIOGateway::DoOutput() that
    could cause it a buffer overrun when under load.
  • Updates testpackettunnel.cpp to be able to test either
    PacketTunnelIOGateway or MiniPacketTunnelIOGateway
  • Fixed the #include-guards and copyright-comments of
    several header files that didn't have them included correctly.
  • The StringTokenizer copy-constructor now handles copying
    from (StringTokenizers using user-provided memory) more
    elegantly.

8.42 release

18 Sep 22:27
Compare
Choose a tag to compare

8.42 - Released 9/18/2021

  • Added a DummyConstSocketRef class, for consistency with
    the existing DummyConstXXXRef naming conventions
  • Modified MessageTransceiverThread::AddNewSession() and
    MessageTransceiverThread::AddNewConnectSession() to take
    an AbstractReflectSessionRef argument instead of a
    ThreadWorkerSessionRef, to allow the addition of
    non-ThreadWorkerSession session objects to the
    internal ReflectServer when necessary.
  • Modified MessageTransceiverThread::PutAcceptFactory()
    to take a ReflectSessionFactoryRef argument instead
    of a ThreadWorkerSessionFactoryRef argument.
  • Added a muscleStrError(int) function to MuscleSupport.h,
    just to avoid warning messages under MSVC.
  • Made the one-argument ConstSocketRef constructor explicit.
  • Removed the ConstSocketRef(const Socket *, bool) constructor;
    use the new DummyConstSocketRef class intead.
  • muscleSnprintf now calls _vsnprintf() (with appropriate
    wrapper-logic to ensure NUL-termination in all cases)
    when compiled on MSVC older than MSVC2015; in all other
    environments it is now a simple synonym for snprintf().
  • muscleStrncpy() now calls through to strncpy() in all cases,
    but also ensures that the last byte in the destination-buffer
    is set to NUL.
  • Changed B_ERRNUM to be an inline-function instead of
    a #define, to avoid double-evaluation of its argument.

8.41 release

01 Sep 22:06
Compare
Choose a tag to compare

8.41 - Released 9/1/2021

  • Added an NWPathMonitor-based implementation to the
    DetectNetworkConfigChangesSession class so that changes to
    the local network devices can be detected properly under iOS.
  • Added a PointerAndBools class for PointerAndBool.h, for
    extremely frugal programmers who want to smuggle two booleans
    into their pointer-fields.
  • Removed the "virtual" tag from the QueueStackGuard class
    constructor since it isn't necessary.
  • Changed ReflectServer's _lameDuckSessions to be a Hashtable
    instead of a Queue, for better consistency with _sessions.
  • Fixed a bug that could cause ReflectServer to occasionally
    generate a spurious resource-leak warning for a lame-duck
    session, just before the session was disposed of.
  • CMakeLists.txt now sets CMAKE_OBJECT_PATH_MAX to 500 to
    work around path-length restrictions under Windows.

8.40 release

16 Jul 02:30
Compare
Choose a tag to compare

8.40 - Released 7/15/2021

  • Added a Windows-only convenience-constructor to the Socket class that
    takes a SOCKET instead of an int, for easier capture of Windows
    socket-descriptors into Socket objects.
  • Added Windows-only convenience-version of the GetConstSocketRefFromPool()
    function that takes a SOCKET instead of an int, for easier capture of
    Windows socket-descriptors into ref-counted Socket objects.
  • Added ICallbackMechanism, ICallbackSubscriber, and SocketCallbackMechanism
    classes to support OS-neutral inter-thread event dispatching.
  • Added Win32CallbackMechanism for integration into Win32 event loops.
  • Added SDLCallbackMechanism for integration into SDL event loops.
  • Added QSocketCallbackMechanism and QPostEventCallbackMechanism for
    integration into Qt event loops.
  • Thread class now inherits from ICallbackSubscriber and its constructor
    optionally takes a pointer to an ICallbackMechanism that can be used
    to automatically handle Messages sent back to the owning thread by
    the Thread's internal thread.
  • Moved platform-specific code into a "platform" subdirectory.
  • Moved (non-C++) language-specific code into a "lang" subdirectory.
  • Changed MessageTransceiverThread::SendMessageToSessions() (and friends)
    to pass strings as (const String &) rather than as (const char *).
  • Removed Win32MessageTransceiverThread and SDLMessageTransceiverThread
    classes.
  • Removed the AcceptSocketsThread and QAcceptSocketsThread classes.
  • Removed support for AtheOS, BeOS, and Haiku (since AFAICT nobody was using
    it, and because previous changes to the status_t type had rendered the
    codebase unbuildable on those platforms anyway)
  • Renamed portablereflectclient.cpp to singlethreadedreflectclient.cpp
  • Removed testreflectclient.cpp and replaced it with
    multithreadedreflectclient.cpp
  • Moved the Python2-specific .py files into a python2 folder, for clarity.
  • Removed win32client.cpp from the test folder (see
    multithreadedreflectclient.cpp instead)
  • Removed the LockSignalling() and UnlockSignalling() methods from the
    Thread class as they aren't useful any longer.
  • Fixed an error with the usage of the fErrorChar and ErrorChar
    fields in the Windows implementation of the RS232DataIO class
    constructor. (Thanks to Mika Lindqvist for providing this fix)
  • Some of the "time since previous packet" metadata output in hexterm's
    stdout output was incorrect. Fix.

8.30 release

07 Jun 18:38
Compare
Choose a tag to compare

8.30 - Released 6/2/2021

  • Added DummyRef and DummyConstRef classes to util/RefCount.h, to support
    reader-friendly declarations of references to stack-based objects.
  • Added the ImmutableHashtable and ImmutableHashtablePool classes to support
    memory-efficient instancing of redundant Hashtables across multiple call sites.
  • Added a ToString() method to the BitChord class for easier debugging.
  • Added a WITH_THREADS CMake argument, to disable linking to threads library.
  • Added a WITH_SANITIZE CMake argument, for building MUSCLE with some of
    clang's sanitization-checkers enabled.
  • Added WouldBeEqualToAfterPut(), WouldBeEqualToAfterRemove(),
    WouldBeEqualToAfterPutOrRemove(), AreKeysAndValuesASubsetOf(),
    and AreKeysAndValuesASupersetOf() methods to the Hashtable class.
  • Added an optional (considerOrdering) argument to the
    Hashtable::AreKeysEqual() and Hashtable::AreKeys*Of() methods.
  • Added a HashCode() method to the Void class so that a Hashtable<xxx,Void>
    can be used in conjunction with an ImmutableHashtablePool.
  • Added a QueueStackGuard convenience class to Queue.h
  • Updated the ObjectCounter class and PrintCountedObjectInfo() to
    also report sizeof(ObjectType) for each counted-object-type.
  • Modified the ObjectCounterBase class so it no longer contains any
    virtual methods.
  • Made one-argument constructors for several QueryFilter subclasses explicit.
  • Made the explicit-two-argument constructors for Ref and ConstRef private;
    use the new DummyRef and DummyConstRef classes instead of calling them.
  • Rewrote the DataNodeSubscribersTable code to use the new
    ImmutableHashtablePool class instead of its own private logic.
  • Hexterm now prints out the number of reads it has done so far.
  • PrintCountedObjectInfo() now sorts its output by size (biggest RAM hogs
    first) and prints total-objects-counted and total-memory-counted stats.
  • Applied various fixes based on warnings supplied by cppcheck.
  • Modified TCPSocketDataIO::FlushOutput() to no longer call
    SetSocketCorkAlgorithmEnabled() when compiled under MacOS/X,
    because MacOS/X's implementation of TCP_NOPUSH is problematic.
  • StringMatcher::SetPattern() wasn't escaping + characters when
    converting simple-wildcard-strings to regex-strings. Fixed.
  • Fixed a bug where Hashtable::IsEqualTo() wouldn't compare values
    when the (considerOrdering) value was passed in as true.

8.20 release

27 Apr 00:11
Compare
Choose a tag to compare

8.20 - Released 4/26/2021

  • Added ARRAYROWS and ARRAYCOLS functions to MuscleSupport.h
    (These are similar to the existing ARRAYITEMS except they return
    the first and second dimensional-extents of a 2D array)
  • Added AreKeysASupersetOf() and AreKeysASubsetOf() convenience
    methods to the Hashtable class.
  • Added an optional (fromIndex) argument to String::Replace()
    and String::GetNumInstancesOf().
  • CMake now compiles the executables in the tests folder also.
  • CMake now compiles the executables in the
    html/muscle-by-example/examples/* sub-folders also.
  • CMake now includes zip/unzip functions from zlib/zlib/contrib/minizip
    in the generated muscle.lib.
  • Added support for the -DMUSCLE_ENABLE_LOCKING_VIOLATIONS_CHECKER
    compile-time flag and the associated functionality in the Mutex
    class (see BUILDOPTIONS.txt for details)
  • Added a NeuterMutex() method to the ObjectPool class.
  • Changed ARRAYITEMS to return uint32 instead of unsigned int.
  • Changed ChildProcessDataIO::WaitForChildProcessToExit()
    to return a status_t rather than a bool.
  • Removed obsolete Win95/Win98 support code from RS232DataIO.cpp.
  • Removed all MSVC project files from the distribution
    (use cmake to generate .vcproj files on-demand instead)
  • Removed Borland Makefiles as obsolete.
  • Removed dev-C++ Makefiles as obsolete.
  • Added explicit assignment-operators to several classes so
    that g++ 9.3.0 wouldn't warn about deprecated implicit behavior.
  • Fixed several const-correctness problems in the minizip code.
  • Updated chatclient, testudp, and portableplaintextclient tests
    to use a StdinDataIO rather than selecting on STDIN_FILENO,
    so that they can work as expected under Windows.
  • Fixed the CMakeList.txt to link to pthreads and util libraries
    when appropriate (before it would only do so if Qt was installed)
  • Fixed a potential string-terminator bug in
    TarFileWriter::WriteFileHeader().
  • Fixed various minor compiler-warnings.

8.10 Release

06 Apr 00:44
Compare
Choose a tag to compare

8.10 - Released 4/5/2021

  • Added ByteBufferPacketDataIO class to the dataio folder.
  • Win32 implementation of ChildProcessDataIO now
    uses a variable-duration polling algorithm to improve
    data-transfer rate from child's stdout to parent process.
  • Added a Prefill() method to the ObjectPool class.
  • Added a new flag SETDATANODE_FLAG_ENABLESUPERCEDE
    to the SetDataNodeFlags enum. PR_COMMAND_SETDATA
    Message specifying this flag will try to remove
    any previously-enqueued-but-still-pending updates
    regarding the DataNodes they modify, so as not to
    build up a FIFO backlog of update-Messages when
    the server is under a heavy update-load.
  • PR_COMAMND_SETDATA parser now accepts PR_NAME_FLAGS
    field as either a SetDataNodeFlags or a uint32,
    for convenience when client isn't C++-based.
  • Added UpdateSubscriptionMessage(), PruneSubscriptionMessage(),
    and UpdateSubscriptionIndexMessage() hook-methods to
    the StorageReflectSession class.
  • Added GetStringReference() convenience-method to the
    Message class.
  • Added MLOG_ON_ERROR, MPRINT_ON_ERROR, MLOG_AND_RETURN_ON_ERROR,
    and MPRINT_AND_RETURN_ON_ERROR macros for convenient error-logging.
  • Added a MiniPacketTunnelIOGateway class, for maximally
    efficient packing of multiple smaller-than-MTU Messages together
    into UDP packets.
  • The ZLibCodec class now inherits from RefCountable.
  • Added SetPacketRemoteLocationTaggingEnabled() and
    GetPacketRemoteLocationTaggingEnabled() methods to the
    AbstractMessageIOGateway class.
  • Added a ProxyIOGateway class that centralizes some common
    code used by both the PacketTunnelIOGateway and the
    MiniPacketTunnelIOGateway (and potentially other
    "decorator" style gateways in the future)
  • Moved the declaration of the SetDataNodeFlags
    BitChord type from StorageReflectSession.h to
    StorageReflectConstants.h.
  • Modified the NotifySubscribersThatNodeChanged()
    and NodeChanged() methods in StorageReflectSession.
    to accept a NodeChangeFlags argument instead of a boolean.
  • Modified the SetData() method in DataNode to
    accept a SetDataFlags argument instead of a boolean.
  • Simplified error-handling in various locations by
    using MRETURN_ON_ERROR instead of explicit if/returns.
  • Moved the AbstractGatewayMessageReceiver and
    QueueGatewayMessageReceiver classes out of
    AbstractMessageIOGateway.h and into their own
    file AbstractGatewayMessageReceiver.h
  • Updated the README.html to include descriptions
    of recently-added classes.
  • Updated the muscle.dox file to match the latest
    DOxygen codebase.
  • Fixed #include in Win32FileHandleDataIO.h
  • Fixed a bug in IPAddress::SetIPv4AddressFromUint32()
    that was causing it to set the interface-index of an
    IPv4 address to 0 instead of to MUSCLE_NO_LIMIT/invalid.
  • Fixed a potential buffer-overrun in
    StorageReflectSession::NodeIndexChanged().
  • PacketDataIO::Write() was mis-named WriteTo(). Fixed.
  • Fixed a bug in qt_advanced_example.cpp that caused
    the InternalThreadS