Muscle Changelog

What's new in Muscle 6.21

May 15, 2015
  • Merged in Mika Lindqvist's patch to make the StackWalker code use less stack space
  • Merged in Mika Linkdqvist's patches for better Cygwin compatibility
  • Made the StackWalker code a bit more robust
  • Merged in Mika Lindqvist's patch to the VC++12 projects to link debug builds against the MultiThreadedDebug run time library rather than the MultiThreaded library
  • Fixed a couple of const-correctness issues in the StackWalker code
  • Modified the Windows implementation of GetNetworkInterfaceInfos() to not specify an interface index for IPv6 network device address 1, as doing so causes UDP-packet-routing problems under Windows 7

New in Muscle 6.20 (Apr 22, 2015)

  • Added a new sub-folder besupport/admin_gui. It contains Fredrik Modeen's GUI shell for more easily running muscled under BeOS or Haiku.
  • Added new MUSCLE-specific versions of some potentially-insecure per Microsoft) C functions to MuscleSupport.h: muscleFopen(), muscleStrcpy(), muscleStrncpy(), muscleSprintf(), and muscleSnprintf(). These get expanded out to the appropriate system-specific equivalent, so that e.g. under Windows we can use the CRT-secure Windows-only equivalents, while not having to put #ifdefs all over the code to keep it compiling elsewhere.
  • Added Visual C++ 2013 project files, courtesy of Mika Lindqvist in the new "vc++12" subfolder)
  • Renamed the vc++ subfolder to vc++8 to make it more obvious that the project files it contains are for Visual Studio 2008.
  • MUSCLE classes that should not be subclasses are now tagged with the MUSCLE_FINAL_CLASS keyword so that when compiled with -DMUSCLE_USE_CPLUSPLUS11 the compiler will produce a compile-time error if they are subclassed.
  • Modified the QueueGatewayMessageReceiver and StringMatcherQueue classes to no longer subclass from the Queue class, since subclassing from Queue is no longer allowed. Instead, they now include a Queue object as a member variable and provide accessors to that object.
  • Modified the ObjectPool class to no longer subclass the ObjectNode internal class from the templated-type, since the templated-type might now be marked as "final".
  • Replaced various of the aforementioned calls with their muscle*() equivalents in the codebase.
  • Merged in some patches contributed by Mika Linqvist to avoid CRT security warnings when compiling under MSVC 2013.
  • Removed all calls to strcat() and strncat(), as their string truncation semantics are too difficult for me to reason about reliably. The rewritten code is also generally more efficient.
  • Modified DefaultFileLogger::CloseLogFile() to reduce its stack usage.
  • Modified GetNetworkInterfaceInfos() to not specify an interface index for IPv6 network device address ::1, as doing so causes UDP-packet-routing problems under MacOS/X.
  • Fixed a const-correctness problem in ConvertMessages.cpp.
  • Removed a compiler warning (from SysLog.cpp) about GetVersionA() not working usefully under Windows 8 and higher.
  • Applied Mika Lindqvist's patch to fix some potential memory leaks in regcomp.c
  • Applied Mika Lindqvist's patch to make the Windows "StackWalker" stack-trace-generation routine Unicode-compliant.

New in Muscle 6.12 (Apr 9, 2015)

  • The Python message_transceiver_thread class will now fall back to connecting via IPv4 if the supplied hostname cannot be expanded to an IPv6 address (and vice versa)
  • Added a NotCopyable base class to various classes Socket, DataNode, AbstractReflectSession, etc) so that the compiler will verify that they are not being copied
  • The StringMatcher class now interprets any simple wildcard string starting with a backtick character (`) as indicating a non-simple regex string. That way it is possible to use the standard regex functionality, if desired, in contexts that otherwise provide no way to indicate that a string is meant to be a full regex string and not a simple wildcard string (e.g. in MUSCLE subscription strings)
  • Tweaked the codebase to get rid of a number of style problems and minor errors that were reported by cppcheck
  • Added a patch to the captive regex library to fix a potential int32-overrun in regcomp().
  • Lindqvist for supplying me with the patch
  • Merged in some patches from Mika Lindqvist to avoid some warnings when compiling in a 64-bit environment

New in Muscle 6.11 (Feb 3, 2015)

  • When compiled under Windows, SetupSystem.cpp now contains pragma commands so that necessary Windows-libraries will be automatically linked in. This means the user no longer has to spend time chasing down so many linker errors when setting up a new project file
  • MutexGuard's argument is now a const reference, since Mutex::Lock() and Mutex::Unlock() are const methods
  • Removed AbstractReflectSession::GetDefaultHostName() and replaced it with a new method named
  • AbstractReflectSession::GenerateHostName(). The new method lets the session subclass choose a custom hostname for the session even if the IP address determination didn't fail
  • Added some private/unimplemented method overloads for MessageTransceiverThread::AddNewConnectSession() and QMessageTransceiverHandler::SetupAsNewConnectSession() so that if the caller tries to call these methods with timeout-values but forgets to include the expandLocalhost) argument, the error will be caught at compile-time rather than causing unexpected run-time behavior

New in Muscle 6.10 (Dec 13, 2014)

  • The DetectNetworkConfigChangesSession class now has ComputerIsAboutToSleep() and ComputerJustWokeUp() callback methods that are called at the times indicated by their names. Currently this functionality is implemented only under MacOS/X and Windows
  • Added work-arounds for gcc-3.x SFINAE incompatibilities to MuscleSupport.h
  • Updated the muscle.dox file using doxygen -u so that it is now up-to-date (as of DOxygen 1.8.8)
  • If a string like "for 10 seconds" was passed to ParseHumanReadableTimeIntervalString(), the "for" prefix would cause the returned value to be twice what it was expected to be. Fixed

New in Muscle 6.09 (Nov 4, 2014)

  • Added a (preferIPv6) argument to GetHostByName(). If left as true (the default value), GetHostByName() will prefer to return an IPv6 address over an IPv4 address.
  • Added support for a DEBUG_LARGE_MEMORY_ALLOCATIONS_THRESHOLD compiler-flag into GlobalMemoryAllocator.cpp. When this flag is set to a value (in bytes), any memory allocations greater than the value will result in a message and a stack trace being printed to stdout.
  • When MUSCLE_USE_CPLUSPLUS11 is defined, the PODHashFunctor class will provoke a compile-time error if the program tries to use a struct or class as a KeyType in a Hashtable and the struct/class does not have a "uint32 HashCode const" method defined. (Previously the code would compile without error, and then hashing errors would occur at runtime due to the object's padding bytes being uninitialized)
  • The MCRASH() macro now calls abort() rather than assert(false), so that a crash will actually occur, even if the code was compiled with -DNDEBUG.
  • The Windows implementation of MCRASH() now calls RaiseException(), so that the crash will behave more like an actual caused-by-a-bug crash (in particular, a Windows Structured Exception will be raised)
  • Updated SendDataUDP() to work around a "feature" in OS/X 10.10 (aka Yosemite) that causes setsockopt(fd, IPPROTO_IPV6, IPV6_MULTICAST_IF) to fail when setting the socket's interface-index value back to 0.

New in Muscle 6.08 (Oct 13, 2014)

  • Added a ShrinkToFit() convenience method to the Queue, Hashtable, and String classes. This method shrinks the object so that the amount of memory it has allocated internally matches the size of the data it is actually holding.
  • Hashtable::EnsureSize() and Queue::EnsureSize() now take an optional allowShrink) argument, that (if set to true) allows the object's internally-allocated array to be reallocated smaller if it is larger than necessary.
  • Tweaked the buffer-expansion behavior of the String class to be a bit more efficient.
  • Added a guard against a potential infinite recursion that could occur while logging an "OUT OF MEMORY" error after a memory allocation failure, if a LogCallback tried to allocate memory.

New in Muscle 6.07 (Sep 19, 2014)

  • Added a GlobalPrintRecyclersToStream() method to the AbstractObjectRecycler class, for better debugging and analysis of the ObjectPool's memory usage.
  • Added an abstract PrintToStream() method to the AbstactObjectRecycler class, and a concrete implementation of that method to the ObjectPool and ThreadPool classes.
  • Added a testobjectpool.cpp test program to the tests folder, as a quick sanity check for the ObjectPool class.
  • Java performance improvement from Bryan Varner: Switched to a direct byte buffer, which is allocated by the OS outside of the GC's managed space.
  • Java performance improvement from Bryan Varner: Scoped the receiving byte buffer to the receiver, which cut down on a lot of time spent allocating short-lived buffers.
  • Java performance improvement from Bryan Varner: Added a constructor for the MessageReceiver to allocate it's buffer to the same size as the sockets underlying buffer and madeuse of the call where possible.
  • Added a GetObjectClassName() method to the ObjectPool class. The GetNetworkInterfaceInfos() function now supports a new bit named GNII_INCLUDE_UNADDRESSED_INTERFACES, which tells it to return even network interfaces with no IP address. The default value of the (includeBits) argument to GetNetworkInterfaceInfos() is now GNII_INCLUDE_ALL_ADDRESSED_INTERFACES rather than GNII_INCLUDE_ALL_INTERFACES, to reflect the nuance that was added above; the default behavior is unchanged, though.
  • When -DMUSCLE_USE_CPLUSPLUS11 is defined, muscleMin() and muscleMax() now use variadic templates so that they can accept any number of arguments (rather than just up to five).
  • Java fix from Bryan Varner: Updated the handling code for NotEnoughDataExceptions to no longer rely on the position of the buffer (but rather look at the buffer limit, or the amount previously read into the buffer) -- which basically makes the above change unnecessary, but I'm paranoid.
  • Changed the Message, Queue, Hashtable, and String classes so that when they are set equal to an empty/default object, they now free any large dynamically-allocated buffer they may be holding. This avoids excessive memory usage by objects that have been returned to an ObjectPool after being used to hold large amounts of data.
  • Modified muscleMin(), muscleMax(), muscleSgn(), muscleClamp(), and musclAbs() to take arguments and return by value rather than by const-reference.
  • Java fix from Bryan Varner: Fixed a bug causing communication failures in the NIO message unflattening.
  • Java fix from Bryan Varner: Prior to throwing a NotEnoughDataException the position of the buffer wasn't being updated in MessageIOGateway and JZLibMessageIOGateway.

New in Muscle 6.06 (Aug 16, 2014)

  • ParseHumanReadableTimeIntervalString() can now parse strings where only the time-unit is specified. (e.g. "second" now returns 1000000)
  • Added GetInternalThreadPulseTime(), InternalThreadPulse(), WriteToMainThread(), and ShutdownInternalThread() methods to the AsyncDataIO class, so that it can be subclassed for use in impersonating a "live" socket, using test data internally generated inside its I/O thread.
  • Added code to testbytebuffer.cpp, so that if a filename is passed as an argument, the contents of the specified file will be printed to stdout in annotated-hex format.
  • Added support for a -DMUSCLE_AVOID_XENOMAI flag, to be used when compiling with -DTARGET_PLATFORM_XENOMAI but we don't want MUSCLE to use Xenomai anyway.
  • Merged in Augustin Cavalier's patch to get MUSCLE to compile again under Haiku.
  • Modified the Queue code to avoid a static-analyizer warning.
  • Fixed a valgrind hit in AbstractReflectSession::Reconnect().
  • Fixed a bug in AsyncDataIO that would cause it to hang when being shut down.
  • Fixed a bug that could cause a QueryFilter's replacement ConstMessageRef object to be ignored in certain circumstances.

New in Muscle 6.05 (Jun 28, 2014)

  • Upgraded the captive zlib implementation to v1.2.8
  • Moved public repository from FreeCode to GitHub, because FreeCode no longer accepts release announcements
  • Renamed LICENSE.txt to LICENSE, since that's how GitHub likes the license file to be named
  • Merged in Mika Lindqvist's patch to avoid some truncation warnings for strlen() calls under 64-bit Visual C++

New in Muscle 6.04 (Jun 12, 2014)

  • Added a public GetParametersConst() method to the StorageReflectSession, for easier debugging
  • Fixed a bug that prevented the PR_COMMAND_REMOVEPARAMETERS handler from removing parameters that had escaped wildcard characters in their names

New in Muscle 6.03 (Jun 3, 2014)

  • Added a convenience method muscleArrayIndexIsValid() that returns true iff the specified numeric index is a valid index into the specified array.
  • Added a CloseCurrentLogFile() function that can be used to force the file-logger to close any log file that it currently has open.
  • Added a SetSendDestinations() method to the UDPSocketDataIO class, for convenience.
  • The Launch*() and System*() methods in the ChildProcessDataIO class now take an optional directory-path argument so that you can specify the current working directory of the child process.
  • Added move-constructors and move-assignment operators to the Ref and ConstRef classes (available only when MUSCLE_USE_CPLUSPLUS11 is defined, of course).
  • Added a Reset() method to the PointerAndBool class.
  • Added a SwapContents() method to the PointerAndBool class.
  • Added RemoveHeadMulti() and RemoveTailMulti() convenience methods to the Queue class.
  • Queue::GetArrayPointer() now makes sure to set (retLength) to 0 when it returns NULL.
  • Under Windows, GetConstSocketRefFromPool() now automatically sets the don't-inherit flag on any sockets passed to it. This avoids problems caused by child processes unintionally holding sockets connections open in the parent process.
  • Fixed a bug in Queue::EnsureSizeAux() that would cause a bogus extra item to be added to the end of the Queue if the setNumItems) argument was set to true.
  • The MacOS/X implementation of DetectNetworkConfigChangesSession would fail to notify its calling code about a changed network configuration if the network change did not include any IP address changes. Now it does provide a notification for that scenario as well.

New in Muscle 6.02 (Jun 3, 2014)

  • Added optional (addHeaderBytes) and (addFooterBytes) arguments to the DeflateByteBuffer() utility functions
  • Added an implementation of GetByteBufferFromPool() that takes a DataIO as an argument, for easy reading in of files, etc
  • Added a NybbleizeData() implementation that takes a pointer and length argument rather than a ByteBuffer object
  • Added an AreKeySetsEqual() convenience method to the Hashtable class. This method checks for equal key-sets while ignoring the values in the two Hashtables
  • Added WithoutPrefixIgnoreCase() and WithoutSuffixIgnoreCase() convenience methods to the String class
  • Added some missing convenience overloads for HexBytesToString() CanWildcardStringMatchMultipleValues() now ignores dashes in the string, since they only have meaning when enclosed in brackets -- and if there are brackets in the string, those will be sufficient to cause CanWildcardStringMatchMultipleValues() to return true
  • Renamed CanRegexStringMatchMultipleValues() to CanWildcardStringMatchMultipleValues(), as it is really examining the simplified wild-card syntax and not the official regex syntax
  • Several locations that were calling HasRegexTokens() to decide if it was worth doing pattern-matching with a key-string now call CanWildcardStringMatchMultipleValues() instead
  • DataNode::Reset() now deletes any metadata structures the DataNode may have accumulated, rather than simply clearing them. This saves RAM, and also ensures that recycled DataNodes will act exactly the same as newly created ones
  • The MemMem() function did not return correct results in all cases. Rewrote it to work correctly

New in Muscle 6.01 (Jun 3, 2014)

  • Added a PrependWord() convenience method to the String class.
  • Added WithReplacements() convenience methods to the String class.
  • Added a SetExplicitDelayMicros() method to the DetectNetworkConfigChangesSession class.
  • Added a IsCopperDetected() method to the NetworkInterfaceInfo class, so that code can tell whether or not a Ethernet jack has a cable plugged in to it.
  • Added a "quietsend" argument to hexterm.
  • The NetworkInterfacesChanged() virtual method in the DetectNetworkConfigChangesSession class has been changed to take an argument that calls out which network interfaces in particular have changed.
  • This functionality is currently only implemented under Linux, MacOS/X and Windows. For other OS's the argument will always be an empty list.
  • Fixed a bug in the Linux implementation of DetectNetworkConfigChangesSession that could cause a segmentation fault if recvmsg() returned an error e.g. due to a signal being received).

New in Muscle 6.00 (Jun 3, 2014)

  • Rewrote the SSLSocketDataIO class to work better with non-blocking I/O (in conjunction with the new SSLSocketAdapterGateway class).
  • Added implementations of SSLSocketDataIO::SetPrivateKey() and SSLSocketDataIO::SetCertificate() that take a ByteBuffer as an argument.
  • Added an SSLSocketAdapterGateway class that is used to manage OpenSSL's internal state machine when using an SSLSocketDataIO class with your gateway.
  • Added SetSSLPrivateKey() and GetSSLPrivateKey() methods to the ReflectServer class, for easier enabling of SSLauthentication on all incoming TCP connections. These methods are available iff MUSCLE_ENABLE_SSL is defined.
  • Added SetSSLPublicKeyCertificate() and GetSSLPublicKeyCertificate() methods to the ReflectServer class, for easier enabling of SSL authentication on outgoing TCP connections. These methods are available iff MUSCLE_ENABLE_SSL is defined.
  • Added SetSSLPrivateKey() and SetSSLPublicKeyCertificate() methods to the MessageTransceiverThread class, for easier enabling of SSL functionality when using threaded I/O.
  • Added an ssl_data folder with some info on generating OpenSSL public/private keypairs, and an example keypair for use in testing OpenSSL. When MUSCLE_ENABLE_SSL is defined, muscled now accepts an optional 'privatekey=filename' argument. When specified, SSL mode will be enabled and muscled will only accept incoming TCP connections that present public keys that match this private key/certificate.
  • When MUSCLE_ENABLE_SSL is defined, portablereflectclient and qt_example will now accept an optional publickey=filename' argument. When specified, SSL mode will be enabled and these clients will connect to muscled using OpenSSL and present this file as their credentials.
  • Added an "Animate" checkbox to the qt_example demo.
  • Checking it causes the window to move its indicator around automatically. This is fun and also useful if you want to test a scenario where multiple clients are generating traffic simultaneously.
  • Made the qt_example demo prettier.
  • Renamed the C++11-helper macros in Hashtable.h and Queue.h to make them less likely to collide with other packages' macros.
  • Fixed some minor errors in the SSLSocketDataIO class.
  • Renamed SSLSocketDataIO::SetKey() to SetPrivateKey().
  • Renamed SSLSocketDataIO::SetCertificate() to
  • SetPublicKeyCertificate().
  • AbstractMessageIOGateway::SetDataIO() is now a virtual method.

New in Muscle 5.68 (Mar 24, 2012)

  • Added an optional (retPort) argument to GetPeerIPAddress().
  • Added optional "spamspersecond" and "spamsize" arguments to hexterm, so that you can have hexterm automatically generate random output at a specified rate for performance testing.
  • Added a "quietreceive" argument to hexterm so that if you don't want to see a printout of the bytes being received, you don't have to.
  • Added GetDistanceTo() and GetSquaredDistanceTo() methods
  • to the Point class.
  • Privileged-address matching is now done using IPv4-style address strings for IPv4 addresses (even when compiled with IPv6 support enabled), per Lior's request.
  • Merged in some Haiku-compatibility fixes

New in Muscle 5.67 (Feb 4, 2012)

  • Added a AreOutgoingMessagesIndependent() method to the
  • MessageIOGateway class, to allow better control over how
  • outgoing Messages are deflated when zlib-encoding is enabled.
  • Removed some unnecessary data members from certain Message
  • field-object classes, to cut down on memory usage.
  • Added a Queue::GetItemAtUnchecked() method.
  • Added a RemoveName() to the Python Message class.
  • o Cleaned up the Python code to avoid pychecker warnings
  • o Removed Queue::GetItemPointer(). Use Queue::GetItemAt() instead.
  • BitChord::ToHexString() was broken -- fixed.
  • Queue::GetItemAt() would return a garbage pointer if passed
  • an invalid index. Fixed to return NULL (as documented) instead.

New in Muscle 5.66 (Feb 4, 2012)

  • Added a CountedRawDataMessageIOGateway class to
  • RawDataMessageIOGateway.{cpp,h}. This class is the same as
  • its RawDataMessageIOGateway superclass, except that it is
  • instrumented to keep a running count of the number of raw
  • data bytes currently held in its output-queue.
  • Added a CountedMessageIOGateway class to MessageIOGateway.{cpp,h}.
  • This is similar to the CountedRawDataMessageIOGateway class
  • described above, except it tracks Message sizes.
  • Added a PopNextOutgoingMessage() virtual method to the
  • MessageIOGateway class, so that subclasses can override its
  • behavior if necessary.
  • Added EventLoopCycleBegins() and EventLoopCycleEnds()
  • virtual method hooks to the ReflectServer class.
  • o AbstractMessageIOGateway::AddOutgoingMessage() is now virtual.
  • o Trying to use -DMUSCLE_USE_POLL under Windows without declaring
  • an appropriate value for -DWIN32_WINNT now gives an informative
  • compile-error message rather than the inscrutible errors that
  • would appear previously.
  • Fixed minor bug in kqueue that could cause obsolete entries
  • to remain in the _bits Hashtable.
  • Fixed a bug in the RawDataMessageIOGateway class that would cause
  • it to emit Messages with a what-code of 0 (rather than
  • PR_COMMAND_RAW_DATA) when in immediate-forward mode.

New in Muscle 5.65 (Feb 4, 2012)

  • Added experimental support for kqueue under FreeBSD/MacOSX,
  • enabled by defining -DMUSCLE_USE_KQUEUE on the compile line.
  • Added experimental support for epoll under Linux
  • enabled by defining -DMUSCLE_USE_EPOLL on the compile line.
  • Updated testsocketmultiplexer.cpp to make it more useful for
  • gathering performance statistics for the various SocketMultiplexer
  • implementations.

New in Muscle 5.64 (Feb 4, 2012)

  • Added a SocketMultiplexer class (util/SocketMultiplexer.{cpp,h})
  • that acts as an API-agnostic wrapper around select() or poll(),
  • depending on whether MUSCLE_USE_POLL is defined or not.
  • MuscleSupport.h now declares uintptr and ptrdiff types that
  • are guranteed to be the same size as a native pointer.
  • Added a PseudoFlattenable base class to Flatten.h, for subclasses
  • that want to act like Flattenable objects but don't want to incur
  • the memory overhead of actually having virtual methods.
  • o Modified all MUSCLE code to use a SocketMultiplexer object
  • rather than calling select() or poll() directly.
  • o Added a testsocketmultiplexer.cpp test to the tests folder.
  • RefCount.h now uses uintptr instead of (unsigned long) when doing
  • its pointer-bit-stuffing magic, to avoid pointer-truncation warnings
  • from MSVC.
  • Message::FindFlat() now does the right thing when an object
  • is added to the Message as a FlatCountableRef and then
  • retrieved from the Message by value.

New in Muscle 5.63 (Feb 4, 2012)

  • Added a MUSCLE_USE_POLL build option which, if defined,
  • will cause ReflectServer::RunEventLoop() to base its
  • event loop around poll() rather than select(). The benefit
  • of this is that with poll() the FD_SETSIZE limit imposed
  • by select() can be be avoided.
  • Made a number of previously protected methods in the
  • AbstractReflectSession class public.
  • StorageReflectSession::PrintSessionsInfo() and
  • StorageReflectSession::PrintFactoriesInfo() now print
  • additional information about the state of the sessions/factories.
  • The Thread constructor now takes an optional boolean argument,
  • so that you can now create a Thread that doesn't allocate a
  • socket-pair for inter-thread messaging purposes. This is useful
  • when you want to create a lot of Threads but don't need to
  • use socket-based inter-thread signalling and don't want to
  • allocate a lot of sockets.
  • Added a FastClear() method to the Queue class (for when
  • you care more about performance than about having item
  • destructors get called right away).
  • Added a RemoveDuplicateItems() method to the Queue class.
  • o Retired the MUSCLE_ENABLE_MULTICAST_API compiler flag, and added
  • MUSCLE_AVOID_MULTICAST_API in its place. (Which is another way
  • of saying that the MUSCLE Multicast API calls are now enabled
  • by default)

New in Muscle 5.62 (Feb 4, 2012)

  • Added a CountedObject class that various other MUSCLE classes
  • now subclass from. Subclassing from the CountedObject class
  • allows the application to efficiently keep track of the number
  • of objects allocated of that type, for debugging/monitoring
  • purposes.
  • Added a PrintCountedObjectInfo() function that prints to stdout
  • a report of how many objects of each counted type are currently
  • allocated.
  • Added a GetCountedObjectInfo() function that returns a Hashtable
  • containing all of the current CountedObject counts.
  • Added support for a -DMUSCLE_AVOID_OBJECT_COUNTING compiler
  • definition that will turn the object-counting code into a no-op
  • if you want it disabled.
  • The Python Message.PrintToStream() method now recursively prints
  • sub-Messages by default. It has arguments that can be used to
  • limit the depth of the recursion, if desired.
  • Added XINT64_FORMAT_SPEC macros to MuscleSupport.h.
  • MCRASH now calls __builtin_trap() under gcc/g++, rather than
  • writing to an invalid pointer.
  • Added a GetGlobalObjectForType() function, which is similar
  • to GetDefaultObjectForType() except that the returned reference
  • is not read-only.
  • o Merged in Jean-François Mullet's patches to allow MUSCLE to be
  • compiled cleanly under Android.
  • Fixed the code so that it now compiles cleanly under clang++ 2.1.
  • String::AppendWord() no longer appends a separator string if
  • the word to be appended is blank.
  • Added some missing string constant declarations to
  • storage_reflect_constants.py
  • Fixed a bug an exception-string-formation line of message.py
  • Fixed a bug in StorageReflectSession::NodeChanged() that would
  • cause incorrect PR_RESULT_UPDATE updates to be generated for
  • subscribers using QueryFilter objects, if the matches-filter
  • status of the node was changed by the node update.

New in Muscle 5.61 (Feb 4, 2012)

  • Added a GetCurrentStackUsage() method to the Thread class.
  • Added a CheckThreadStackUsage() function and CHECK_THREAD_STACK_USAGE
  • Macro to Thread.{cpp,h} to make it easier to determine if and
  • when a Thread is allocating more stack space than it was allowed
  • to allocate.
  • Added a ThreadPool class to the system folder.
  • Added EINTR-proof wrapper functions to NetworkUtilityFunctions.h
  • for recv(), recvfrom(), send(), sendto(), read(), and write().
  • MUSCLE code now calls the wrapper functions (e.g. recv_ignore_eintr)
  • so that incoming signals won't cause spurious errors to be returned.
  • Added an Arg(const void *) method to the String class, so that
  • Arg() can be used to print out pointer values.
  • o Replaced String::AddWord() with String::AppendWord(), which is
  • easier to use and takes an optional separator-string argument.
  • The Point and Rect implementations of String::Arg() were broken; fixed.

New in Muscle 5.60 (Sep 20, 2011)

  • Added a qt_advanced_example directory to the qtsupport folder
  • to demonstrate more advanced usage of the QMessageTransceiverThread
  • class. See the README.TXT and the diagram PNG in that directory
  • for details
  • Added a TamperEvidentValue class (in support/TamperEvidentValue.h)
  • ThreadWorkerSession and ThreadWorkerSessionFactory objects now
  • have (and use) a SendMessageToSupervisorSession() method for
  • sending messages to their supervisor. This is more efficient
  • and less error-prone that calling BroadcastMessgeToAllSessions()
  • and relying on non-supervisor recipients to ignore the Messages
  • that weren't meant for them, as was done previously
  • Added SetForwardAllIncomingMessagesToSupervisor() and
  • IsForwardAllIncomingMessagesToSupervisor() methods to the
  • ThreadWorkerSession, ThreadWorkerSessionFactory, and
  • MessageTransceiverThread classes. These methods govern how
  • Messages incoming from remote peers should be handled
  • o Retired the MUSCLE_USE_IPV6 compiler option, since enabled
  • IPv6 support is now the default. If you want to disable IPv6
  • support, you'll need to specify -DMUSCLE_AVOID_IPV6 instead
  • o ThreadSupervisorSession::SendMessageToWorkers() is now
  • protected rather than private
  • o MessageTransceiverThread::GetNextEventFromInternalThread
  • now passes PR_RESULT_* Messages to the caller, so that it's
  • possible to use a MessageTransceiverThread as if it it were
  • a client to the local MUSCLE thread, if desired
  • o QMessageTransceiverThread now calls SetDoLogging(false)
  • inside CreateReflectServer() rather than afterwards, so
  • that subclasses can easily re-enable logging if they want to
  • Gave the README.TXT file a badly needed rewrite/update
  • Tweaked the doxygen.dox file to yield better-looking
  • DOxygen HTML documentation
  • genDocs.sh now automatically extracts the current
  • MUSCLE version number from MuscleSupport.h, so it's
  • no longer necessary to manually update the muscle.dox
  • file for each MUSCLE release

New in Muscle 5.57 (Sep 20, 2011)

  • Added the following new compile-time constant
  • definitions to NetworkUtilityFunctions.h
  • MUSCLE_EXPECTED_MTU_SIZE_BYTES
  • MUSCLE_POTENTIAL_EXTRA_HEADERS_SIZE_BYTES
  • MUSCLE_IP_HEADER_SIZE_BYTES
  • MUSCLE_MAX_PAYLOAD_BYTES_PER_UDP_ETHERNET_PACKET
  • These constants (particularly the last one) are
  • useful for deciding how many bytes of data can
  • be added to a UDP packet without risking packet
  • fragmentation
  • testudp now prints out the values of the above
  • constants when it is run
  • Added a SetCount() method to the NestCount class
  • HandleStandardDaemonArgs() now accepts "realtime_rr"
  • or "realtime_fifo" as alternatives to the pre-existing
  • "realtime" keyword, for those who like to specify
  • their scheduling algorithm explicitly
  • The PacketTunnelIOGateway constructor now uses
  • MUSCLE_MAX_PAYLOAD_BYTES_PER_UDP_ETHERNET_PACKET as
  • its default maxTransferUnit value, rather than hard-coding
  • a magic value of 1500 (which was too large anyway)
  • Fixed a bug that could cause Snooze64(MUSCLE_TIME_NEVER)
  • to return immediately, rather than sleeping forever as
  • intended
  • GetHumanReadableTimeIntervalString(MUSCLE_TIME_NEVER)
  • now returns "forever", rather than "584,942 years"
  • Fixed warning in DemandConstructedObject == operator
  • Fixed warning in ZLibCodec destructor

New in Muscle 5.56 (Sep 20, 2011)

  • Added a StorageReflectSession::PrintFactoriesInfo()
  • method to go with the existing PrintSessionsInfo() method
  • Added InsertItemAtSortedPosition() methods to the Queue
  • class, for convenience in doing insertion-sorting
  • Added SetSuggestedStackSize() and GetSuggestedStackSize()
  • methods to the Thread class
  • Added a IsSymLink() method to the FilePathInfo class
  • Added a qt_muscled folder to the qtsupport sub-directory
  • The .pro file in this folder builds a version of muscled that
  • runs in a Qt GUI window
  • Added a "Clone Window" button to the qt_example application
  • to make quick demonstrations of multiple-client scenarios
  • easier
  • The qt_example application is now more colorful -- each
  • client gets assigned his own (random) color
  • o Added checks for (sizeof(float)==4) and (sizeof(double)==8)
  • to the SanitySetupSystem constructor
  • o PrintHexBytes() and LogHexBytes() now take a
  • ConstByteBufferRef rather than a ByteBufferRef, since
  • they don't ever need to modify the ByteBuffer they receive
  • o DataNode objects now store their ordered-child index as
  • a Queue of DataNodeRefs rather than a Queue of String pointers
  • This avoids any possibility of dangling pointers in the index
  • o DataNode::GetIndex() now returns a (Queue *)
  • rather than a (Queue *)
  • o DataNode::ReorderChild() now takes a DataNodeRef rather
  • than a reference to a DataNode object
  • o Added util/FilePathInfo.cpp, and Moved the non-trivial
  • FilePathInfo method bodies into it
  • o Made FileDescriptorDataIO.cpp compile (as a no-op)
  • under Windows, to avoid project-file confusion
  • CPULoadMeter::GetCPULoad() now uses uint64s to store tick
  • counts rather than uint32s, to avoid potential overflows
  • SysLog.cpp now works around the lack of a declaration
  • for TzSpecifiedLocalTimeToSystemTime() function when compiling
  • under Windows with the Mingw compiler
  • Made several other tweaks for Mingw32 compatibility
  • Fixed the qt_muscled.pro to work under Windows
  • Fixed a bug in the qt_example application that would cause
  • a qt_example client to disconnect and reconnect whenever
  • the server-name field lost focus

New in Muscle 5.55 (Sep 20, 2011)

  • Added a "plain" keyword to hexterm's arguments; useful
  • if you don't want any headers in hexterm's output
  • Made it possible to embed hexterm as part of a larger program
  • Added Arg() methods to the String class that take a bool
  • a Point, or a Rect as an argument
  • Added a ToMixedCase() method to the String class
  • Added AddWord() methods to the String class
  • Added HeadWithDefault() and TailWithDefault() methods to the
  • Queue class that take a default-argument parameter
  • Added a PrintSessionsInfo() method to the StorageReflectSession
  • class, for quick discovery of what sessions are present and
  • how much RAM they are each using
  • The ObjectPool class now takes the maximum slab size as
  • a template argument, and has an assertion-check to make
  • sure that the resulting objects-per-slab count is small
  • enough to be tracked by a uint16 (i.e. is less than 65536)
  • Fixed a crashing bug in hexterm's ASCII mode

New in Muscle 5.54 (Sep 20, 2011)

  • Added a GetDefaultObjectForType() templated function to
  • MuscleSupport.h. This function returns a reference to
  • a default-constructed static object of the specified type
  • Added a description of the Hashtable class's feature set
  • to the Hashtable DOxygen documentation
  • Added a const [] operator to the Hashtable class. The
  • operator behaves the same as the GetWithDefault() method
  • Expanded and enhanced the DOxygen per-class documentation
  • of various classes
  • o Reduced sizeof(Queue), sizeof(Hashtable), and
  • sizeof(ObjectPool) by removing their default-object member
  • items and adding calls to GetDefaultObjectForType() instead
  • o Replaced the various get-default-object convenience methods
  • GetEmptyString(), GetEmptyMessage(), etc) with inline
  • call-throughs to GetDefaultObjectForType()

New in Muscle 5.53 (Sep 20, 2011)

  • Added TarFileWriter.{cpp,h} to the zlib folder. This class
  • allows for quick inline writing of .tar files to disk
  • Added a MUSCLE_MAY_ALIAS macro to MuscleSupport.h, as
  • an easier way to invoke gcc's __attribute__((__may_alias__))
  • This macro expands to empty under other compilers
  • Added a version of the muscleCopyIn() function that returns
  • the copied-in value, for convenience
  • Added a DemandConstructedObject template (in
  • util/DemandConstructedObject.h) to allow for member variables
  • whose constructors aren't called until the object is actually
  • needed for something
  • Added a ClearAndFlush() method to the String class, for
  • forcing a String object to free its allocated data
  • o Reduced sizeof(String), by by employing a union to reuse
  • the bytes used for referencing small and large char arrays
  • o Reduced sizeof(Ref) by storing the boolean (doRefCount)
  • value in the least significant bit of the item pointer
  • this works because the item pointers are guaranteed
  • to be word-aligned -- if for some reason that guarantee
  • isn't valid for a given environment, the old method can
  • be reinstated by adding -DMUSCLE_AVOID_REFCOUNT_BITSTUFFING
  • to your compiler arguments)
  • o Reduced sizeof(DataNode) by making the subscribers table
  • demand-allocated, rather than a member variable
  • o Removed the MUSCLE_CPU_REQUIRES_DATA_ALIGNMENT define
  • because it is no longer used anywhere
  • Rewrote the HashtableIterator class to no longer use
  • type-punning trickery, so that g++ versions 4.4.0 and higher
  • no longer complain about strict aliasing being broken

New in Muscle 5.52 (Sep 20, 2011)

  • Added a Tuple::Contains() convenience method
  • Added a ExecuteSynchronousMessageSend() method to the
  • MessageIOGateway class. This method is similar to
  • ExecuteSynchronousMessageRPCCall(), except that this method will
  • return to the caller as soon as the Message is sent, without
  • waiting for the server to return a reply Message
  • Added CreateSynchronousPingMessage() and IsSynchronousPongMessage()
  • hook methods to the MessageIOGateway class, so that subclasses can
  • specify alternative ping/pong Messages if they wish to
  • Added a IsCharInLocalArray() method to the String class
  • Added a IsItemLocatedInThisContainer() method to the Queue class
  • Added a GetNumUnusedItemSlots() method to the Queue class
  • Added a + operator and += operators for the ByteBuffer class
  • Made the + operators for the String class more efficient
  • o Converted the ExecuteSynchronousMessageRPCCall() functions into a method
  • of the MessageIOGateway class, so that its behavior can be used in conjunction
  • with a MessageIOGateway subclass to customize their behavior, if necessary
  • Some of the methods in the Queue class could access freed memory
  • if passed in references to held data items, and a reallocation occurred. Fixed
  • Some of the methods in the String class could access freed memory
  • if passed in references to their own string, and a reallocation occurred. Fixed
  • Some of the methods in the ByteBuffer class could access freed memory
  • if passed in a pointer to their own bytes, and a reallocation occurred. Fixed
  • Fixed a bug in StorageReflectSession::NodePathMatcher::CheckChildForTraversal()
  • that could cause the traversal callback to be called with an invalid DataNode
  • likely causing the callback to crash. This bug was a regression introduced
  • in the 5.51 release
  • CalculateChecksumForFloat() and CalculateChecksumForDouble() would return
  • different checksum values for 0.0 and -0.0, even though the == operator
  • considers them equivalent. Fixed

New in Muscle 5.51 (Sep 20, 2011)

  • Added convenience methods to the Queue class: HeadWithDefault()
  • TailWithDefault(), RemoveHeadWithDefault(), RemoveTailWithDefault()
  • and RemoveItemAtWithDefault(). These methods are all safe to call
  • even when the Queue is empty
  • Added a SLIPFramedDataMessageIOGateway class to the iogateway
  • folder. As the name suggests, it is used to do SLIP encoding
  • and decoding on outgoing and incoming raw data, respectively
  • Added an AppendByte() method to the ByteBuffer class, for convenience
  • The WARN_OUT_OF_MEMORY macro now prints the number of bytes that
  • the failed memory allocation attempted to allocate
  • Added SetExpendable() and IsExpendable() methods to the
  • AbstractReflectSession class, to help influence which sessions
  • will be thrown under the bus in a low-memory situation
  • o The QueryFilter::Matches() methods have been modified to take a
  • ConstMessageRef &) argument instead of (const Message &), so that
  • it is now possible to create a QueryFilter subclass that modifies
  • the data it returns. (Not that any of the QueryFilter subclasses
  • included in the MUSCLE distribution currently do this)
  • o Removed the optional MemoryAllocator pointer argument from the
  • ReflectServer constructor. Now ReflectServer simply accesses the
  • installed MemoryAllocator object directly (via
  • GetCPlusPlusGlobalMemoryAllocator()) when necessary
  • When MUSCLE_USE_IPV6 is defined, SharedFilterSessionFactory now
  • compares ip_address objects using ip_address::EqualsIgnoreInterfaceIndex()
  • instead of the == operator. This avoids spurious mismatches between IPv4
  • addresses that have their interface index set, and those that don't
  • UnparseArgs(const Message &) wasn't escaping quote marks embedded
  • in the strings in the Message. Fixed
  • UnparseArgs(const Message &) wasn't properly handling multiple values
  • filed under the same field name. Fixed

New in Muscle 5.50 (Sep 20, 2011)

  • Added a qt_muscled_browser subfolder to the qtsupport folder. qt_muscled_browser
  • is a GUI MUSCLE database browser, based on code contributed by Jean-François Mullet
  • Added GetFirstKeyWithDefault(), GetLastKeyWithDefault(), GetFirstValueWithDefault()
  • and GetLastValueWithDefault() convenience methods to the Hashtable class
  • Added a RemoveWithDefault() convenience method to the Hashtable class
  • Added a CountAverageLookupComparisons() method to the Hashtable class
  • to help determine the hashing performance of various hash functions
  • Added a -DMUSCLE_WARN_ABOUT_LOUSY_HASH_FUNCTIONS preprocessor define
  • which will cause the Hashtable reallocator to calculate the hashtable's
  • average lookup comparisons value after every hashtable resize, and
  • complain if the average lookup count is too high
  • Added 3-argument constructors to the AndOrQueryFilter and NandNotQueryFilter classes
  • Added regex/FilePathExpander.{cpp,h}. These files contain a single function
  • ExpandFilePathWildCards(), which expands wildcarded file paths into a list of
  • non-wildcarded paths, similar to shell expansion
  • Added test/testmatchfiles.cpp, a unit test for the ExpandFilePathWildCards() function
  • o Moved the boolean "isAnd" argument to the front of the arguments list for the
  • AndOrQueryFilter constructors
  • o Removed the -DMUSCLE_COLLECT_HASHTABLE_COLLISION_STATISTICS preprocessor
  • define, since the new -DMUSCLE_WARN_ABOUT_LOUSY_HASH_FUNCTIONS replaces it
  • o PortableReflectClient now includes a string showing the current time when you
  • s'et a node, so it's easier to see the node change in other clients
  • FilePathInfo::SetFilePath(NULL) would crash. Fixed
  • ChildProcessDataIO::System() and ChildProcessDataIO::LaunchChildProcess()
  • weren't NULL-terminating their argv arrays. Fixed

New in Muscle 5.43 (Sep 20, 2011)

  • Added GetSocketBlockingEnabled() function to NetworkUtilityFunctions.{cpp,h}
  • Added GetSocketNaglesAlgorithmEnabled() function to NetworkUtilityFunctions.{cpp,h}
  • Added GetSocketSendBufferSize() function to NetworkUtilityFunctions.{cpp,h}
  • Added GetSocketReceiveBufferSize() function to NetworkUtilityFunctions.{cpp,h}
  • Added GetUDPSocketBroadcastEnabled() function to NetworkUtilityFunctions.{cpp,h}
  • hexterm now batches its stdin input together to send in fewer buffers, if possible
  • Added a libmuscle.a target to the Makefile in the server folder
  • Directory::MakeDirectory() now takes an optional third argument to specify
  • whether the pre-existence of the requested directory should be considered an error
  • Added a qt_example sub-directory to the qtsupport folder. This directory
  • contains buildable code for a sample Qt-based GUI MUSCLE client
  • FilePathInfo now handles file paths ending in a slash properly, even if the
  • filesystem object located at that path is not a directory
  • Fixed hexterm so that it no longer exits prematurely when reading stdin from a file
  • ChildProcessDataIO::System(const Queue &) wasn't declared static. Fixed

New in Muscle 3.34 (Aug 20, 2007)

  • Optimized CreateConnectedSocketPair() by having it use the UNIX socketpair(AF_UNIX) function on systems that support that call.
  • Removed the optional (useNagles) argument from the CreateConnectedSocketPair() function, since there is little or no point in using Nagles algorithm for sockets within the same process. (if you really needed it for some reason, you could still call SetSocketNaglesAlgorithmEnabled() manually on the resulting sockets afterwards)
  • tests/cvscopy.cpp is now tests/svncopy.cpp, since I don't use CVS anymore.
  • Thread::WaitForNextMessageAux() wasn't handling file descriptors properly when called with a wakeupTime less than or equal to the current time. Fixed.
  • Added a testpulsenode.cpp file to the tests folder, to test the reliability and scalability of the PulseNode timed-event-callback implementation.
  • Fixed some valgrind hits in NetworkUtilityFunctions.cpp by having the code check the sin_family of sockaddr structs before reading any IPv4-specific fields.
  • QMuscleSupport.h wouldn't compile under Qt 3.x. Fixed.
  • Added Mika Lindqvist's patches to get QMuscleSupport.h to compile under older versions of Microsoft Visual C .
  • The SharedUsageLimitProxyMemoryAllocator class was not always freeing all of the cached memory during large free operations, which could result in the process-memory-cache getting too large. Fixed.
  • Fixed a bug in the PulseNode class's linked list code that could cause PulseChildren to not have their Pulse() methods called at the proper times.
  • Merged in Bryan Varner's patch to the MessageTransceiverThread Java class so that spurious connect-succeeded tags are no longer sent by the I/O thread to the main thread.