MUSCLE Changelog

What's new in MUSCLE 6.82

May 3, 2018
  • tests/Makefile-mt no longer tries to compile testreflectsession except when executing on an OS that testreflectsession supports.
  • Did some minor editing and re-arranging of the "MUSCLE by Example" pages.
  • Replaced a number of `tags` in the MkDocs with [URLs](...)
  • Removed private-inheritance of CountedObject from all the classes that had it -- now they include a CountedObject private member variable instead. This was done only because all that private inheritance was cluttering up the DOxygen inheritance graphs.
  • Added a DECLARE_COUNTED_OBJECT macro to CountedObject.h so that any potential memory-overhead of CountedObjects can be eliminated in cases where object-counting is not desired.
  • Removed support for the -DMUSCLE_AVOID_OBJECT_COUNTING and added a -DMUSCLE_ENABLE_OBJECT_COUNTING macro in its place. (That is, the CountedObject class is now disabled-by-default and must be explicitly enabled in order to use it)
  • Added "MUSCLE by Example" documentation for MiscUtilityFunctions.{cpp,h}
  • Changed a number of `tags` in the MUSCLE-by-Example MkDocs source into [urls] so that the methods they mention can be quickly reviewed.
  • server/Makefile now specifies libmuscle.a after the main() .o file.
  • Fixed some gcc warnings in the tests folder (per Mika's suggestions)
  • UnparseFile() wasn't quoting keywords with spaces properly. Fixed.
  • Fixed the dependencies in the "MUSCLE by Example" examples' Makefiles.

New in MUSCLE 6.72 (Feb 8, 2018)

  • MUSCLE_AVOID_CPLUSPLUS11 will now be #defined automatically inside MuscleSupport.h if it wasn't explicitly specified AND the __cplusplus preprocessor token is defined to a value smaller than 201100.
  • Added a muscleClearArray() templated convenience functions to MuscleSupport.h
  • Fixed a deprecation warning for kSCNetworkInterfaceTypePPTP in NetworkUtilityFunctions.cpp (MacOS/X only)
  • AtomicCounter.h and Mutex.h will now use the corresponding C++11 APIs in their internal implementation unless MUSCLE_AVOID_CPLUSPLUS11 is defined.
  • Added logic to detect XCode versions before 8.0 and auto-enable MUSCLE_AVOID_CPLUSPLUS11_THREAD_LOCAL_KEYWORD when they are detected, since XCode's clang++ didn't support the thread_local keyword before XCode 8.0.
  • Fixed compile error in AtomicCounter.h if C++11 was enabled and also MUSCLE_SINGLE_THREAD_ONLY was defined.

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.01 (Jan 9, 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 (Oct 15, 2013)

  • 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 SSL authentication 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. o Renamed SSLSocketDataIO::SetKey() to SetPrivateKey(). o Renamed SSLSocketDataIO::SetCertificate() to SetPublicKeyCertificate(). o AbstractMessageIOGateway::SetDataIO() is now a virtual method.

New in MUSCLE 5.92 (Sep 21, 2013)

  • Improved support for C++11 move-semantics in the Queue and Hashtable classes (enabled only when -DMUSCLE_USE_CPLUSPLUS11 is defined)
  • Added some instrumentation to the String class so I can watch how many times a String object is copied, moved, etc (enabled only when -DMUSCLE_COUNT_STRING_COPY_OPERATIONS is defined)
  • Added a PrintAndClearStringCopyCounts() function which will print out the String-operation data collected above.
  • Added some SFINAE magic to muscleSwap() so that it will swap by calling SwapContents() when possible, rather than by copying to a temporary object.
  • Added an initializer-list constructor and overload of AddTailMulti() to the Queue class (available only when -DMUSCLE_USE_CPLUSPLUS11 is defined, of course)
  • Renamed the Queue and array overloads of Queue::AddTail() to AddTailMulti(), to avoid conflicts with the new C++11 template parsing support.
  • Renamed the Queue and array overloads of Queue::AddHead() to AddHeadMulti(), to avoid conflicts with the new C++11 template parsing support.
  • Replaced MCRASH_IMPL macro with a call to assert(false).
  • A little more Android-compatibility tweakage.
  • Many of the programs in the tests folder weren't compiling under C++11. Fixed.
  • Fixed several potential bugs that were detected by clang's static analysis tool.

New in MUSCLE 5.91 (Sep 4, 2013)

  • Added EnsureCanPut() convenience method to the Hashtable class.
  • Added EnsureCanAdd() convenience method to the Queue class.
  • Changed DoMutexAtomicIncrement() to be an inline function to make calling it more efficient.
  • Changed QMessageTransceiverThread and QAcceptSocketsThread to call QCoreApplication::postEvent() rather than QApplication::postEvent(), to allow for non-GUI Qt apps.
  • Updated the Beginner's Guide document to reflect MUSCLE's improved UDP support.
  • Merged in some Android compatibility changes provided by Jean-François Mullet.
  • Use of the MUSCLE_USE_MUTEXES_FOR_ATOMIC_OPERATIONS compile flag would cause MUSCLE to crash on startup due to an order-of-operations issue. This has been fixed now.
  • The MUSCLE_USE_MUTEXES_FOR_ATOMIC_OPERATIONS compile flag was previously only used if no other implementation of AtomicCounter was available. Now the flag has higher precedence, so setting the flag means that Mutexes will be used, even if another (more efficient) mechanism is available.

New in MUSCLE 5.90 (Aug 7, 2013)

  • Added a GetPacketMaximumSize() method to the DataIO class to allow gateway code to more intelligently handle UDP-style packetized communication.
  • MessageIOGateway now works usefully in conjunction with UDPSocketDataIO.
  • Added CreateObjectFromArchiveMessage() templated functions to Message.h, to serve as a restoring-side counterpart to GetArchiveMessageFromPool(), etc.
  • AtomicCounter::AtomicIncrement() now returns a boolean (true iff the new counter value is equal to one).
  • Modified the HashtableIterator class so that read-only Hashtable iterations are now thread-safe even if the HTIT_FLAG_NOREGISTER flag isn't specified.
  • Added a muscle_thread_id class to SetupSystem.h, to properly represent a thread ID in an implementation-neutral fashion.
  • Added a "deadlock" program to the tests folder. This program deliberately risks creating a deadlock, as a way to exercise/demonstrate the deadlockfinder test.
  • Added support for a -DMUSCLE_AVOID_THREAD_SAFE_HASHTABLE_ITERATORS command line flag, for those who would rather avoid the overhead of automatic thread safety and promise to supply HTIT_FLAG_NOREGISTER arguments by hand where necessary.
  • Added an optional LRU lookup cache to the GetHostByName() function, so that it can return more quickly when the same hostnames are getting resolved over and over again.
  • Added a SetHostNameCacheSettings() function that enables and adjusts the LRU lookup cache in GetHostByName().
  • Added support for "dnscache" and "dnscachesize" command line arguments in HandleStandardDaemonArgs(), to allow command-line specification of the LRU lookup cache's behavior.
  • Modified the Hashtable class so that the _iterHead, _iterTail, and _freeHead member values are now uint32s rather than pointers, to reduce memory usage.
  • Removed the ThreadLocalStorage::SetFreeHeldObjectsOnExit() method, and added a boolean argument to its constructor instead, since pthreads don't allow you to change that setting after pthread_key_create() has been called.
  • Moved GetCurrentThreadID() into the muscle_thread_id class as a static member function, and changed it to return a muscle_thread_id object rather than unsigned long.
  • Changed the default hostname for sessions without a known IP address from "" to "_unknown_", as the angle brackets in the former string have a special meaning as of the 5.84 release, and that could interfere with node-path matching in unintended ways.
  • The CalculateChecksum() methods in Message.cpp have been modified to be more robust in detecting data transposition differences.
  • Removed the MUSCLE_USE_QT_FOR_ATOMIC_OPERATIONS support from AtomicCounter.h, since Qt's QAtomicInt class doesn't support the functionality that the AtomicIncrement() method's new return value requires.
  • Removed MessageIOGateway::FlattenMessage() and MessageIOGateway::UnflattenMessage(). Added in their place: MessageIOGateway::FlattenHeaderAndMessage() and MessageIOGateway::UnflattenHeaderAndMessage(). These new methods deal with both the header bytes and the Message body at the same time.
  • Added a udpproxy.vcproj file to the tests folder, to help compile udpproxy under Windows.
  • Message:Flatten() now iterates over the fields in the Message once, instead of twice.
  • GetCurrentThreadID() is now an inline function, since it may now get called often by HashtableIterator.
  • Modified the deadlockfinder code to use Queues instead of Hashtables, since muscle_thread_id can't be used as a Hashtable key type anymore.
  • Fixed testudp.cpp to properly use a MessageIOGateway for its UDP communication.
  • Tweaked the ifdefs in FilePathInfo.cpp a bit more so that statInfo.st_birthtimespec won't be accessed when using MacOS/X SDKs that don't provide it.
  • MessageDataIOGateway no longer tries to Unflatten a Message from a zlib-deflated data buffer that it was unable re-inflate.
  • Fixed a bug in SendDataUDP() that could cause SendDataUDP() to incorrectly return an error when sending to a multicast address using non-blocking mode, and the output buffer was full.

New in MUSCLE 5.85 (Jul 3, 2013)

  • Added LogTime(MUSCLE_LOG_DEBUG) calls to all the error paths in MessageIOGateway::DoInputImplementation() and Message::Unflatten(), so that it's easier to determine when TCP connections are being aborted due to data corruption.
  • Added a PreviousOperationHadTransientFailure() function, which returns true iff errno is EINTR or ENOBUFS.
  • Specifying spamspersecond=-1 will now cause hexterm to send spam data as fast as possible.
  • SocketMultiplexer.h's MUSCLE_USE_POLL implementation was supplying POLLERR to WSAPoll() but WSAPoll() doesn't support POLLERR so WSAPoll() would return an error when this occurred. Worked around the problem by filtering out POLLERR when compiling under Windows.
  • Fixed a bug where send() returning ENOBUFS could cause the socket connection to be terminated, even though ENOBUFS is not a fatal condition.
  • SocketMultiplexer.cpp would not compile when MUSCLE_USE_POLL was defined. Fixed.
  • The ZLibCodec::Deflate() method would fail to compress all the data in a very large buffer (e.g. over 42MB). Fixed.

New in MUSCLE 5.84 (Apr 22, 2013)

  • The StringMatcher class's numeric-range syntax has been extended so that you can now specify multiple ranges. For example, "" would match strings "19", "20", "21", "25", "30", "31", [...], and "50".
  • Added GetCurrentTime64ForRunTime64() and GetRunTime64ForCurrenTime64() conversion functions to TimeUtilityFunctions.h.
  • Added a GetDescendant() utility method to the DataNode class.
  • Added C++11 move-constructors and move-assignment-operators to the Hashtable, Queue, String, Message, and ByteBuffer classes. For backwards compatibility with older compilers, this code will only be compiled if -DMUSCLE_USE_CPLUSPLUS11 is specified on the compile line.
  • SharedMemory class will now nerf itself into a non-shared-memory class if -DMUSCLE_FAKE_SHARED_MEMORY is specified.
  • Added a testfilepathinfo test to the tests folder.
  • Updated all copyright notice headers to read 2000-2013 Meyer Sound.
  • Added spaces between macro tokens (e.g. UINT32_FORMAT_SPEC) and string constants (e.g. "Hello") to make C++11 compilers happy.
  • ByteBuffer.cpp had a syntax error that would prevent it from compiling on big-endian hosts. Fixed.
  • MacOS/X only: Replaced deprecated Carbon function calls with Mach equivalents, to avoid deprecation warnings under 10.8.x.

New in MUSCLE 5.83 (Nov 12, 2012)

  • Added convenience versions of InflateByteBuffer() and DeflateByteBuffer() that take a ByteBufferRef as an argument.
  • Removed some obsolete/unused methods (EnsureBufferSize() and FreeLargeBuffer()) from the AbstractMessageIOGateway class.
  • Fixed some typos in the comments in the delphi subfolder.
  • The Hashtable class no longer generates warnings when compiled under MSVC with -DMUSCLE_AVOID_MINIMIZED_HASHTABLES defined.
  • Fixed a bug in IPAddressAndPort::ToString() that caused IPv4 address strings to be formatted ambiguously when (preferIPv4Style) was set to false.

New in MUSCLE 5.82 (Oct 3, 2012)

  • Rewrote the Hashtable class so that it now saves memory by internally using smaller per-slot index values (e.g. uint8 or uint16, rather than uint32) in Hashtables with fewer than 65,535 slots in their HashtableEntry-array.
  • Added support for compiling with -DMUSCLE_AVOID_MINIMIZED_HASHTABLES, which will disable the above optimization (since sometimes you'd rather use more memory and have faster code execution)
  • Fixed ZLibUtilityFunctions.cpp so that it will again build when -DMUSCLE_SINGLE_THREAD_ONLY is defined.

New in MUSCLE 5.81 (Sep 14, 2012)

  • If compiled with -DMUSCLE_ENABLE_DEADLOCK_FINDER, HandleStandardDaemonArgs() will now look for a "deadlockfinder" argument that can be used to force deadlock-prints on or off.
  • Rewrote the ZLibUtilityFunctions.cpp calls to use ThreadLocalStorage rather than shared ZLibCodec objects serialized by Mutexes. This change helps avoids any possibility of deadlocks, and also improves performance because now multiple threads can inflate and/or deflate data in parallel. For systems without a ThreadLocalStorage implementation, the old implementation can still be used as a fallback, by compiling with -DMUSCLE_AVOID_THREAD_LOCAL_STORAGE.
  • The pthreads implementation of the ThreadLocalStorage now uses the destructor-callback feature of pthread_create_key() to ensure that created thread-local-data objects are destroyed in a timely manner (i.e. when their host thread exits, rather than only when the ThreadLocalStorage object destructor runs) o ParseHexBytes() no longer treats commas as token-separator characters, that way they can be escaped (by prefixing them with a slash) and entered as ASCII literals.

New in MUSCLE 5.80 (Aug 31, 2012)

  • The main change in this release is the addition of the MicroMessage API, a super-lightweight set of C function calls to support the sending and receiving of Message objects in very constrained environments.
  • In particular, this API does absolutely no dynamic memory allocations, and almost no data copying -- instead, the flattened-data representation is read from or written to directly on demand.
  • This release also adds some additional methods to the C++ Message class, inlines some methods in the String class, and fixes a few minor bugs.

New in MUSCLE 5.72 (Jun 28, 2012)

  • A compilation error under 64-bit environments using GCC 4.7.x was fixed, and some MSVC compiler warnings were cleaned up.
  • A HexBytesToAnnotatedString() function was added for getting a PrintHexBytes()-style ASCII+hex dump as a String.
  • ParseHumanReadableTimeIntervalString() was enhanced so that it now understands non-integral time units (e.g. "3.5 minutes").

New in MUSCLE 5.71 (Jun 12, 2012)

  • This version adds some endian-aware primitive-type data-manipulation methods to the ByteBuffer class, some additional convenience methods for the String class, easier signal handling for the SignalHandlerSession class, and a PointerAndBool class that generalizes the space-saving trick previously used privately in the RefCount class.

New in MUSCLE 5.70 (May 9, 2012)

  • This version fixes a couple of bugs.

New in MUSCLE 5.67 (Feb 4, 2012)

  • Minor bugs were fixed.
  • Memory usage of the Message class was reduced a bit, better control over the zlib-encoding of outgoing compressed Message objects was provided, and a deprecated Queue method was removed (GetItemPointer()).

New in MUSCLE 5.66 (Jan 8, 2012)

  • This release adds a couple of gateway subclasses that keep track of the number of bytes currently in their output queues, adds a couple of additional callbacks to the ReflectServer class, and fixes a couple of minor bugs.

New in MUSCLE 5.65 (Dec 23, 2011)

  • This version adds two more implementations of the SocketMultiplexer class, one based on BSD's kqueue()/kevent(), and another based on Linux's epoll().

New in MUSCLE 5.64 (Dec 14, 2011)

  • This version adds a SocketMultiplexer class which hides the details of select() and poll() behind a simpler and more consistent API.
  • It also fixes a bug in Message::FindFlat() which could cause it to return incorrect results when called on locally-created Messages containing FlatCountableRef-referenced objects.

New in MUSCLE 5.63 (Dec 2, 2011)

  • This version adds optional support for basing the ReflectServer event loop around poll() instead of select.
  • It also makes the socket-pair in the Thread class optional, adds a couple of new methods to the Queue class, and makes the multicast API enabled by default.

New in MUSCLE 5.62 (Nov 3, 2011)

  • This release updates the code to compile cleanly under Android and clang++2.1, and adds an object counting mechanism (via the new CountedObject template), making it is possible to see how many of each type of object your program is using at any given time.
  • Some minor bugs were fixed, and the Python implementation of Message.PrintToStream() now prints sub-Messages recursively (as the C++ implementation always has).

New in MUSCLE 5.61 (Sep 29, 2011)

  • This version adds a ThreadPool class, a mechanism that allows a Thread object's internal thread to check its current stack usage, better EINTR handling for send() and recv() calls, and a couple of other minor bugfixes and enhancements.

New in MUSCLE 5.60 (Sep 20, 2011)

  • This version enables IPv6 support by default.
  • It can be disabled with -DMUSCLE_AVOID_IPV6.
  • A new Qt example called qt_advanced_example was added.
  • It demonstrates how to run a multi-threaded MUSCLE server inside a thread in a Qt GUI application, and how to make the GUI communicate with it.
  • Major updates were made to the README.TXT file and the DOxygen documentation.

New in MUSCLE 5.56 (Sep 5, 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.
  • Added checks for (sizeof(float)==4) and (sizeof(double)==8) to the SanitySetupSystem constructor.
  • PrintHexBytes() and LogHexBytes() now take a ConstByteBufferRef rather than a ByteBufferRef, since they don't ever need to modify the ByteBuffer they receive.
  • 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.
  • DataNode::GetIndex() now returns a (Queue *) rather than a (Queue *). DataNode::ReorderChild() now takes a DataNodeRef rather than a reference to a DataNode object.
  • Added util/FilePathInfo.cpp, and Moved the non-trivial FilePathInfo method bodies into it.
  • 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 zSpecifiedLocalTimeToSystemTime() 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 (Jul 29, 2011)

  • This is a very minor release that adds some additional convenience methods to the String and Queue classes, adds some debugging support to the StorageReflectSession class, and fixes a crash bug in hexterm.

New in MUSCLE 5.54 (Jun 27, 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.
  • Reduced sizeof(Queue), sizeof(Hashtable), and sizeof(ObjectPool) by removing their default-object member items and adding calls to GetDefaultObjectForType() instead.
  • Replaced the various get-default-object convenience methods (GetEmptyString(), GetEmptyMessage(), etc) with inline call-throughs to GetDefaultObjectForType().

New in MUSCLE 5.53 (Jun 17, 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.
  • Reduced sizeof(String), by by employing a union to reuse the bytes used for referencing small and large char arrays.
  • 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)
  • Reduced sizeof(DataNode) by making the subscribers table demand-allocated, rather than a member variable.
  • 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 (Jun 9, 2011)

  • This version fixes a crashing regression and includes tweaks to the container classes for handling aliased objects intelligently, rewrites the SynchronousMessageRPCCall functionality to be more flexible, and fixes the CalculateChecksumForFloat() and CalculateChecksumForDouble() functions to handle the -0.0 case correctly.

New in MUSCLE 5.51 (May 24, 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.
  • 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)
  • 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 (Apr 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.
  • Moved the boolean "isAnd" argument to the front of the arguments list for the AndOrQueryFilter constructors.
  • Removed the -DMUSCLE_COLLECT_HASHTABLE_COLLISION_STATISTICS preprocessor define, since the new -DMUSCLE_WARN_ABOUT_LOUSY_HASH_FUNCTIONS replaces it.
  • 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 (Mar 30, 2011)

  • This version adds a Qt example application (in muscle/qtsupport/qt_example), and also various previously-missing functions for querying the settings of a socket.
  • There are a few minor bugfixes.

New in MUSCLE 5.40 (Dec 21, 2010)

  • This release adds some time-unit-conversion functions, a DetectNetworkConfigChangeSession class that can notify your code when the host system's network configuration has changed, and a TelnetPlainTextMessageIOGateway class that strips telnet command codes from incoming TCP data.
  • It also simplifies the shared-memory design of the SharedUsageLimitProxyMemoryAllocator.
  • Finally, it fixes a memory allocation bug in the StringMatcher class.

New in MUSCLE 5.35 (Dec 6, 2010)

  • This release fixes a bug that could cause excessive memory usage in some circumstances, adds several new convenience methods to various classes, fixes the system-memory-usage measurement routines under Mac OS X, and adds an on-exit callback so that statically allocated ZLibCodecs no longer get reported as "possibly leaked" by valgrind's memcheck tool.

New in MUSCLE 5.34 (Oct 20, 2010)

  • Support was added for setting a time limit on asynchronous TCP connections.
  • The option to disable output to stdout and stderr, wrappers for strcasecmp() and strncasecmp(), and a system-global memory-usage measurement function were added.

New in MUSCLE 5.33 (Sep 1, 2010)

  • This release fixes a bug in Inet_PtoN() under Windows, adds bit-masking support to the NumericQueryDataFilter class, fixes a bug in ParseArgs(), improves string comparison support, and adds a udpproxy program to the tests folder.
  • Various other minor bugs were fixed.

New in MUSCLE 5.32 (Jul 23, 2010)

  • Added a GetTimeStampForHumanReadableTimeValues() function to SysLog.{cpp,h}. This function does the inverse operation of GetHumanReadableTimeValues().
  • Added a HumanReadableTimeValues::ToString() method, for convenience.
  • Added SetFSyncOnClose() and IsFSyncOnClose() methods to the FileDescriptorDataIO class.
  • Added a SortFieldNames() method to the Message class.
  • Added FindMatchingNode() and FindMatchingNodes() convenience methods to the StorageReflectSession class.
  • Added a serialproxy utility to the tests folder. This program exports a local serial port as a TCP port.
  • Message::FieldsAreSubsetOf() is now a public method. o Replaced GetServerUptime() with GetServerStartTime(), so that the returned value can remain meaningful even if stored for a period of time.
  • Threads in a Java com.meyer.muscle.thread.ThreadPool object now exit cleanly when they are interrupted (e.g. by an applet shutdown). Previously they would just ignore the InterruptedException and stick around, gumming things up.
  • The interface-0-send-detect code no longer prints an error if the destination address is (invalidIP), on the assumption that the UDP socket was previously connected using SetUDPSocketTarget() in that case.
  • ReceiveDataUDP() now returns correct source-address/port information even when receiving IPv4 UDP packets while compiled with the MUSCLE_USE_IPV6 flag defined.

New in MUSCLE 5.31 (Jun 8, 2010)

  • Added LaunchIndepentChildProcess() static methods to the ChildProcessDataIO class, for quick fire-and-forget style launching of child processes.
  • Added an optional maxWaitTimeMicros argument to the ChildProcessDataIO::System() methods.
  • Added a QDataIODevice adaptor class to the qtsupport folder.
  • Made the MUSCLE GetCurrentThreadID() function publicly available (declared in system/SetupSystem.h).
  • Added a MUSCLE_ENABLE_DEADLOCK_FINDER flag.
  • The deadlock-finder no longer requires manual insertion of PLOCK and PUNLOCK macros everywhere; instead, that functionality is conditionally compiled into the Mutex class itself.
  • Added code to deadlockfinder.cpp to detect inconsistent sequences and print error messages about them, instead of just printing out all sequences and leaving it up to the user to detect any problems.
  • The deadlock-finder generation code now stores up its output in RAM until the process is exiting, and dumps it to stdout at that time. That way race conditions in accessing stdout are avoided, so the output won't be garbled.
  • LockLog() and UnlockLog() now lock/unlock a separate lock that is dedicated to the log callbacks only, instead of calling through to the global muscle lock.
  • InflateBuffer() and DeflateBuffer() now use their own Mutex also, for reasons similar to those listed above.
  • The Windows implementation of ChildProcessDataIO now marks its master/slave notify sockets as non-inheritable, so that subsequent child process won't hold them open unexpectedly.

New in MUSCLE 5.30 (May 10, 2010)

  • Added proper copy/assignment/equality operators to the StringMatcher class, and added a HashCode() method to it so that it can be a key in a Hashtable.
  • Added OP_CONTAINS_BITS and OP_DOESNT_CONTAIN_BITS operators to the NumericDataQueryFilter family of classes, so that you can do some bit-chord logic in a QueryFilter.
  • Added an Area() method to the Rect class.
  • Added optional checksum calculation and printing to hexterm.
  • Added a GetDefaultObject() method to the ObjectPool class that gives read-only access to the ObjectPool's persistent default-constructed object.
  • Added a GetEmptyByteBuffer() function to ByteBuffer.{cpp,h}
  • GetEmptyMessageRef() now returns a ConstMessageRef instead of a MessageRef, to ensure that the returned Message is not (easily) modified.
  • GetEmptyByteBufferRef() now returns a ConstByteBufferRef instead of a MessageRef, to ensure that the returned ByteBuffer is not (easily) modified.
  • Simplified the ObjectPool class to make it less error-prone and easier to use. The function callbacks are gone; instead, recycled objects are reset to their default state simply by using their assignment operator to set them equal to a default-constructed object.
  • IsRegexToken() no longer considers ':' to be a regex token. This change is because ':' is often used in otherwise non-regex strings, and is never the only regex character in a regex string. * Fixed some compiler warnings under MSVC 2008 * Fixed a bug that would cause subscriptions not to be properly unsubscribed in some cases.

New in MUSCLE 5.22 (Mar 4, 2010)

  • Added SetSocketKeepAliveBehavior() and GetSocketKeepAliveBehavior() functions to NetworkUtilityFunctions.{cpp,h}. Note that these functions are only available if MUSCLE_ENABLE_KEEPALIVE_API is defined.
  • Added SetGlobalSocketCallback() and GetGlobalSocketCallback() to NetworkUtilityFunctions.{cpp,h}, to allow all TCP sockets in the process to be set up in a similar way, if desired.
  • Added a portablereflectclient.vcproj file to the tests folder, so that portablereflectclient can be compiled under Microsoft Visual Studio.
  • The AtomicCounter class now uses the OSAtomicCounter.h atomic counter API when compiled under MacOS/X.
  • Added an optional (maxReplaceCount) arg to the String::Replace() methods.
  • Added a ServerComponent::IsFullyAttachedToServer() method, which returns true iff AttachedToServer() has already returned success, and AboutToDetachFromServer() hasn't been called yet. o Removed MUSCLE_CUSTOM_ATOMIC_TYPE support from the AtomicCounter class, since it wasn't useful and was cluttering up the code. o Rewrote the CalculateChecksum() and CalculateChecksumFor*() methods to call through to CalculateHashCode(), since the existing checksum algorithms were not very good at avoiding checksum collisions. * Updated win32client.vcproj and win32client.cpp to build properly again. * Fixed a couple of typos in AsyncDataIO.cpp. * GetFileLogName() is no longer included in the MUSCLE_INLINE_LOGGING headers in SysLog.h, since its inclusion caused chicken-and-egg problems. * Added inline versions of PrintStackTrace(), GetStackTrace(), GetLogLevelName(), and GetLogLevelKeyword(). * Made all of the inline log functions into static inlines.

New in MUSCLE 5.21 (Jan 22, 2010)

  • Added UnparseFile() functions to MiscUtilityFunctions.{cpp,h}. These convert a ParseFile()-style Message back into a text file.
  • Added printsourcelocations.cpp to the tests folder. This program will scan a source code directory tree and print out the 4-letter source location codes corresponding to all calls to LogTime(), along with their human-readable location and the line of source code.
  • The source code location alphabet had the numeral '5' in it, which was not supposed to be there (it looks too much like 'S'). Removed it.
  • Fixed a bug where UnparseArg("arg= val") wouldn't parse correctly.
  • Fixed a potential race condition in ObjectPool::Drain().
  • Some dependencies were missing from the VC++ project files; added them.
  • Converted RefCount::CheckedGetItemPointer() from a method into a stand-alone inline function, because calling methods on a NULL pointer is specified as causing undefined behavior in C++, and therefore having CheckedGetItemPointer() as a method is unsafe.
  • Removed unnecessary files from the vc++ folder, updated vc++/README.txt

New in MUSCLE 5.20 (Dec 30, 2009)

  • PrintStackTrace() is now implemented under MSVC/Win32, using Jochen Kalmbach's StackWalker class.
  • The debugcrashes command line argument is now supported under MSVC/Win32; with it specified, crashes will cause PrintStackTrace() to be called, and therefore a stack trace to be printed to stdout.
  • Added a GetTotalDataSize() method to the Hashtable and Queue classes, so that it's possible to query how much RAM the container is using.
  • The Message::*Flat() methods are now templated so that the object you pass in to them doesn't have to be a subclass of Flattenable... it just have to have necessary methods declared. This lets you save memory on small flattenable objects since they no longer need a vtable pointer.
  • Added a GetFlattenedByteBufferFromPool() method to ByteBuffer.h.
  • The HashtableEntry class now stores references to other HashtableEntries as uint32 slot indices rather than pointers, so that its memory footprint doesn't increase on 64-bit systems.
  • Added a GetRawArrayPointer() method to the Queue class to allow direct/low-level access to the Queue's items array.
  • UnparseArgs(const Queue &) now takes optional startIdx and afterEndIdx arguments.
  • Rewrote/simplified the HashtableIterator class: Removed all of the HasMore*(), GetNext*(), and PeekNext*() methods. The only methods remaining are GetKey(), GetValue(), HasData(), operator++(), and operator--().
  • Rewrote/simplified the MessageFieldNameIterator class: Removed the HasMoreFieldNames(), GetNextFieldName() and PeekNextFieldName() methods. The only methods remaining are HasData(), GetFieldName(), operator++, and operator--.
  • The String, Point and Rect classes no longer derive from Flattenable, and no longer have any virtual methods.
  • Removed the (initialSize) constructor argument from the Queue and PathMatcherQueue classes, since it was rarely used and added 4 bytes to the size of the Queue class. * debugcrashes is also now enabled under OS/X. * Rewrote the POSIX implementation of ChildProcessDataIO so that the marshalling of the child process's arguments array is done in the parent process rather than between fork() and execve(); that avoids potential problems with doing dynamic memory allocation during that awkward phase of the child's development. * Added a work-around in SendDataUDP() for a misfeature of MacOS/X (and possibly other IP stacks) where sendto() will send on the default interface even when the destination address clearly specifies another interface. * Replaced calls to gmtime() with gmtime_r(), for thread safety.

New in MUSCLE 5.11 (Nov 24, 2009)

  • Added GetHumanReadableTimeIntervalString() to SysLog.h.
  • Added GetEmptyByteBufferRef() to ByteBuffer.{cpp,h}.
  • Added a DataNode::GetChild() method that returns the result as a return value rather than as a by-reference parameter.
  • ParseHumanReadableTimeIntervalString() can now correctly parse multiple-clause time interval strings of the type generated by GetHumanReadableTimeIntervalString().
  • Added a GetPulseParent() method to the PulseNode class.
  • Removed the MUSCLE_ROUTING_FLAG_REFLECT_TO_SELF bit from the DEFAULT_MUSCLE_ROUTING_FLAGS_BIT_CHORD constant, since including this bit made the sessions' default routing behavior different from what it was (and is) documented to be.
  • BatchOperator now calls BatchEnds() from within the batch context instead of after the batch context has ended, for consistency with the semantics of BatchBegins().
  • Rewrote the Windows implementation of the Mutex class to use critical sections rather than locking a Windows Mutex directly, for better performance.
  • Renamed the Python files in the python folder from e.g. CamelCase.py to e.g. lower_underbar_case.py, per the Python Style Guide.
  • Made CalculateHashCode() and CalculateHashCode64() non-inline functions, since they are rather large to be inlined.
  • Rewrote the Xenomai implementation of GetRunTime64() to call rt_timer_tsc() instead of rt_timer_read(), so that the value returned is nanoseconds-since-boot, not nanoseconds-since-1970.
  • The "realtime" command line argument support now memsets() the sched_param struct to zero before filling it out, just in case it has other members besides sched_priority.
  • Fixed a bug in the Hashtable class where copying one Hashtable to another could cause multiple identical entries to appear in the target table's iteration list.

New in MUSCLE 5.10 (Oct 14, 2009)

  • This version adds support for automatic log archiving and rotation, better control over inter-session Message routing, some new routines to easily compress or decompress byte buffers, and enhanced Doxygen documentation.
  • Also, the usual bugfixes and code cleanup were done.

New in MUSCLE 5.00 (Sep 17, 2009)

  • This major new version has rewritten Hashtable and Queue classes that use templated functors for item sorting instead of function pointers.
  • It also splits the DataIO::GetSelectSocket() method in two, so that a DataIO can use one socket for reading and another for writing.
  • There are also a large number of other bugfixes and minor enhancements.

New in MUSCLE 4.63 (Jul 19, 2009)

  • When compiled with MUSCLE_USE_IPV6 enabled, MUSCLE now does automatic transparent remapping of IPv4-compatible IPv6 addresses into IPv4-mapped IPv6 addresses. This allows MUSCLE servers to be 100% compatible with both IPv4 and IPv6 clients (on platforms that support dual stacks, of course) without any additional effort on the programemr's part.
  • Added SetAutomaticIPv4AddressMappingEnabled() and GetAutomaticIPv4AddressMappingEnabled() calls to NetworkUtilityFunctions.{cpp,h}.
  • Added CAdd*() and CPrepend*() convenience methods to the Message API, to the common "add value to Message unless it's the default value" idiom quicker and easier to express.
  • Added Contains() convenience methods to the String class.
  • Added an optional (optRetTotal) argument to SharedUsageLimitProxyMemoryAllocator::GetCurrentMemoryUsage().
  • Added a ParseHumanReadableTimeIntervalString() convenience function to MiscUtilityFunctions.cpp.
  • Added an static Exists() method to the Directory class.
  • Added a PutOrRemove() convenience method to the Hashtable class.
  • Added an IsValidIP() function to NetworkUtilityFunctions.{cpp,h}.
  • GetNextEventFromInternalThread() now has an optLocation parameter that can be used to find out the IP address and port that a session connected to (or what accepted from).
  • The SessionConnected() signals of the QMessageTransceiverThread and QMessageTransceiverHandler classes now include an IPAddressAndPort object indicating what the session connected to.
  • The SessionAccepted() signal of the QMessageTransceiverThread class now includes an IPAddressAndPort object indicating where the session was accepted from.
  • Added SetAsyncConnectDestination() and GetAsyncConnectDestination() methods to the AbstractReflectSession class.
  • Added ToString() methods to the SegmentedStringMatcher and StringMatcher classes.
  • SegmentedStringMatcher no longer bothers to allocate a StringMatcher object for clauses that are represented by "*". o Renamed DataNode::CountChildren() to DataNode::GetNumChildren(). o Renamed DataNode::SetMaxKnownChildID() to DataNode::SetMaxKnownChildIDHint(). o Renamed Message::CountNames() to Message::GetNumNames(). o Rewrote the static internal function AdjustValue() in SharedUsageLimitAllocator.cpp to give more informative error output. o Removed Message::GetConstPointer() since you can use GetPointer() to do the same thing (by assigning a const pointer to the result). o Documented some methods that were previously not documented. * Fixed a bug where SharedUsageLimitAllocator::ResetDaemonCounter() could push the cumulative memory counter into negative territory. * Inet_NtoA was allowing the IPv6-specific "@3" interface-index suffix into IPv4-style address strings. Fixed. * SetupSystem.cpp's Muscle_GetCurrentThread() wasn't working properly on 64-bit OS's. Fixed.

New in MUSCLE 4.62 (Jun 18, 2009)

  • Added a ThreadLocalStorage class to the muscle/system sub-folder. This class makes it easy for each thread to access its own local copy of a global object, without any need for Mutex locking/unlocking overhead.
  • Added a Thread::GetCurrentThread() static method, so that any Thread can access its Thread object conveniently.
  • Added additional fields to the PR_RESULT_PARAMETERS Message:
  • PR_NAME_SERVER_CURRENTTIMEUTC (server's GetCurrentTime(UTC))
  • PR_NAME_SERVER_CURRENTTIMELOCAL (server's GetCurrentTime(LOCAL))
  • PR_NAME_SERVER_RUNTIME (server's GetRunTime64())
  • Added a AddApplicationSpecificParametersToParametersResultMessage() method to the StorageReflectSession class. It allows a subclass to add fields to the PR_RESULT_PARAMETERS Message before it goes back to the client.
  • Added an IsIPv4Address() function to NetworkUtilityFunctions.{cpp,h}
  • Added GetSendDestinations() methods to the UDPSocketDataIO object. With these methods you can have the UDPSocketDataIO object send the same UDP packet to multiple destinations whenever Write() is called.
  • Added a GetDefaultItem() method to the Queue class.
  • Added GetDefaultKey() and GetDefaultValue() methods to the Hashtable class.
  • If TARGET_PLATFORM_XENOMAI is defined, GetRunTime64() now uses Xenomai's rt_timer_read() function to determine its result.
  • GetNetworkInterfaceInfos() and GetNetworkInterfaceAddresses() now accept a bit-chord of GNII_INCLUDE_* bits as their second argument, rather than a simple boolean. This allows the caller to express in a bit more detail which sorts of interfaces he is interested in.
  • Added a convenience constructor to the AndOrQueryFilter class.
  • Added testthread.cpp back in to the test/Makefile.
  • Modified testthread.cpp to test the ThreadLocalStorage class also.
  • Reorganized the ObjectPool.h class implementation.
  • Simplified the Qt implementation of the Thread class.
  • system/Mutex.h now #includes support/MuscleSupport.h, so that the Win32 build environment is detected properly even when system/Mutex.h is the first #include.

New in MUSCLE 4.61 (May 23, 2009)

  • Added GetTotalNumSignalsReceived() and GetNumSignalsReceivedOfType() methods to the SignalMultiplexer class.
  • Added an IsCurrentThreadMainThread() function to SetupSystem.{cpp,h}.
  • Added support for a "catchsignals" keyword to HandleStandardDaemonArgs(). This keyword, if specified, will cause the main thread's ReflectSession() (if any) to add a signal handler session to itself.
  • Added support for a MUSCLE_AVOID_SIGNAL_HANDLING compiler flag that can be defined by applications that don't want to compile in signal handling support.
  • Added a SignalChildProcess() method to the ChildProcessDataIO class.
  • ChildProcessDataIO::WaitForChildProcessToExit() now takes an optional timeout value, and returns true if the child exited or false if it timed out.
  • In the ChildProcessDataIO class, I replaced SetKillChildOnClose() and SetWaitForChildOnClose() with a single SetChildProcessShutdownBehavior() method which provides for more flexibility, making it possible to do a "soft shutdown with a hard kill after a timeout". o Removed the "catchsignals" support from muscledMain()'s setup code, since that support is now part of HandleStandardDaemonArgs() instead.

New in MUSCLE 4.60 (May 16, 2009)

  • The Message class now derives from Cloneable.
  • The Message::FindInt*() methods class now accept both
  • signed and unsigned value arguments, so that dangerous
  • C-style casting is no longer necessary when retrieving
  • unsigned integer values.
  • Added a set of Message::Get*() methods that are similar to
  • Message::Find*() except that they return the found value
  • instead of a status code. (if the requested value is not found,
  • they return a user-provided default value instead)
  • The Message::Find*() methods now take their value parameters
  • by reference instead of by pointer.
  • (e.g. msg.FindInt8("foo", x) instead of msg.FindInt8("foo", &x).
  • The old by-pointer style is still supported, but is deprecated.
  • Added a Queue::LastIndexOf() method that does a reverse
  • search in a Queue, optionally within a specified index range.
  • Added a Flattenable::UnflattenFromByteBuffer() method
  • that takes a ConstByteBufferRef argument, per Mika's request.
  • Added SetLowBits(), SetHighBits() to the IPv6 ip_address class.
  • When MUSCLE_USE_IPV6 is defined, the ip_address class now
  • includes an interface-address field. Inet_AtoN() and Inet_NtoA()
  • now append/expect this field at the end of the string if the
  • interface is non-zero (e.g. "fe80::1@3")
  • Upgraded the multicast API to properly support IPv6 multicast.
  • In particular, when MUSCLE_USE_IPV6 is defined,
  • AddSocketToMulticastGroup() and RemoveSocketFromMulticastGroup()
  • no longer take an interface IP address (instead they use the
  • interface index included in the groupAddress argument).
  • Also SetSocketMulticastSendInterfaceAddress() and
  • GetSocketMulticastSendInterfaceAddress() are replaced by
  • SetSocketMulticastSendInterfaceIndex() and
  • GetSocketMulticastSendInterfaceIndex(). This is necessary
  • because IPv6 doesn't identify interfaces by IP address,
  • rather it identifies them with integers.
  • Added a broadcastIP_IPv4 constant to NetworkUtilityFunctions.h
  • to allow IPv4 braodcasts even in IPv6 mode.
  • Added a localhostIP_IPv4 constant to NetworkUtilityFunctions.h
  • to allow references to the IPv4 localhost device in IPv6 mode.
  • Added a GetHashCodeForIPAddress() function to
  • NetworkUtilityFunctions.h, to avoid #ifdefs in application code.
  • Added a IsMulticastIPAddress(const ip_address &) function
  • to NetworkUtilityFunctions.{cpp,h} that returns true iff the
  • specified address is a multicast addess.
  • Added a IsStandardLoopbackDeviceAddress(const ip_address &)
  • function to NetworkUtilityFunctions.h, since under IPv6
  • localhostIP has several names and thus doing a literal
  • numeric comparison to (localhostIP) can be error-prone.
  • Added a GetConnectString(const String &, uint16) convenience
  • function to MiscUtilityFunctions.{cpp,h}, to generate strings
  • like "localhost:9999" or "[ff05::1]:9999" correctly.
  • Added an ExecuteSynchronousMessageRPCCall() function to
  • MessageIOGateway.{cpp,h}. This function connects to a
  • server via TCP, sends a Message, received a Message,
  • and returns the received Message, so that you can "call"
  • a server, RPC-style, as if it was a local function.
  • Added a GetLocalHostName() function to
  • NetworkUtilifyFunctions.{cpp,h}.
  • Added a HashCode64() method to the String class, and a
  • CStringHashFunc64() function that it calls.
  • Added a ToString() method to the NetworkInterfaceInfo class.
  • Improved the parsing of IPAddressAndPort and ParseConnectArg()
  • so that they now properly handle IPv6 hostname-and-port
  • strings that don't contain brackets, when possible.
  • Added a version of ParseConnectArg() that takes a direct
  • String (instead of a Message and field name)
  • Rewrite the Win32 implementation of GetNetworkInterfaceInfos()
  • to use GetAdaptersAddresses() instead of GetIpAddrTable(),
  • so that it can detect IPv6 addresses as well as IPv4.
  • Added an optional (preferIPv4Style) argument to Inet_NtoA()
  • so that if you prefer, IPv4 addresses can be returned in the
  • classic style ("192.168.1.1") instead of new-style ("::192.168.1.1")
  • Added support for the MUSCLE_INCLUDE_SOURCE_LOCATION_IN_LOGTIME
  • compiler flag, which if specified will cause every call to
  • LogTime() to include location info (source file name and line
  • number) in the log information. This can be useful for
  • tracking down exactly where a particular log message came from.
  • When MUSCLE_INCLUDE_LOCATION_IN_LOGTIME is defined, the
  • standard log-line preamble now includes the string returned
  • by GetStandardLogLinePreamble().
  • Added GenerateSourceCodeLocationKey(),
  • SourceCodeLocationKeyToString(), and
  • SourceCodeLocationKeyFromString() functions to Syslog.{cpp,h}
  • Added a utility called "findsourcelocations" to the tests folder.
  • This utility will find possible locations for source code keys
  • in the specified directory hierarchy.
  • Added a HashCode() method to the NetworkInterfaceInfo class.
  • The Directory class is now a subclass of RefCountable.
  • Added a GetPath() method to the Directory class.
  • Added FileExists(), RenameFile(), CopyFile(), and DeleteFile()
  • utility functions to util/MiscUtilityFunctions.{cpp,h}.
  • Added an MEXIT(ret,msg) macro to MuscleSupport.h. It's
  • the same as MCRASH, but it doesn't crash, it merely ends
  • the process (by calling ExitWithoutCleanup(ret)).
  • Added a Reset() method to the StringMatcher class.
  • Added a WasConnected() method to AbstractReflectSession,
  • so that subclasses can find out if the session ever was
  • connected to its remote peer.
  • ExpandLocalhostAddress() now caches its first result from
  • GetNetworkInterfaceInfos() so that it no longer has to
  • call GetNetworkInterfaceInfos() every time it is called.
  • Added a GetServerSessionID() method to the ReflectServer
  • class, and a PR_NAME_SERVER_SESSION_ID field to the
  • standard parameters set, so that clients can access a
  • 64-bit value that is unique to the current server instance.
  • Added a SignalMultiplexer class that deals with POSIX
  • signals or Windows Console signalling in a unified manner.
  • Added a QSignalHandler class that can emit a Qt signal
  • when a POSIX/Windows signal is received.
  • Added a SignalHandlerSession class that you can add
  • to your ReflectServer if you want signals to result
  • in a graceful shutdown (or other custom behavior)
  • The Python MessageTransceiverThread class constructor
  • now takes a boolean argument which indicates whether or
  • not it should use IPv6 networking.
  • Added a GetHumanReadableProgramNameFromArgv0(const char *)
  • convenience function to MiscUtilityFunctions.{cpp,h}.
  • Added a Win32AllocateStdioConsole() function that allocates
  • a console window for stdio to use under Windows.
  • Added CleanupDNSLabel() and CleanupDNSPath() functions to
  • MiscUtilityFunctions.{cpp,h}. These are handy for removing
  • errors from user-entered DNS hostnames (e.g. "www.foo.com").
  • Rewrote String::LastIndexOf(char) and the String -=
  • operators to be more efficient.
  • The arguments to the Log() method in the LogCallback API
  • are now consolidated into a single LogCallbackArgs object,
  • for efficiency and cleaner code.
  • The GetStandardLogLinePreamble() function now takes a
  • single LogCallbackArgs argument instead of separate args also.
  • Removed support for the MUSCLE_AVOID_NAMESPACES,
  • BEGIN_NAMESPACE, END_NAMESPACE, and USING_NAMESPACE
  • macros, since they aren't necessary and use of macros to
  • control namespaces can confuse Qt's moc utility.
  • Rewrote portablereflectclient to use StdinDataIO instead
  • of accessing stdin directly. This allows it to work
  • correctly under Windows, and simplifies the code.
  • Queue::IndexOf() was defined as returning the last
  • matching item, which was inconsistent. Replaced it with
  • a new IndexOf() implementation that does a forward search,
  • optionally within a specified index range.
  • Suppressed a warning in zip.c
  • Removed the explicit signal handling from the ReflectServer
  • class (SetSignalHandlingEnabled() and WasSignalCaught() are
  • gone now). This functionality is now handled by the
  • SignalHandlerSession class instead.
  • The Win32 "console" keyword wasn't redirecting stdin. Fixed.
  • Fixed a syntax error in the EnsureRefIsPrivate() method.
  • Updated the VC++ project files so they build again.
  • ParseConnectArg() now handles the "[ipv6::addr]:port"
  • syntax properly when MUSCLE_USE_IPV6 is defined.
  • Fixed a bug in the PulseChild class that would sometimes
  • prevent the GetPulseTime() method of grandchild PulseChild
  • nodes from getting called after InvalidatePulseTime() was
  • called on them.
  • AbstractReflectClient::Reconnect() now sets the _wasConnected
  • flag to false.
  • Fixed a bug in MessageTransceiverThread::AddNewWorkerConnectSession()
  • that was causing disconnect notifications not to be sent for
  • connect-sessions whose connections failed synchronously.
  • IntCompareFunc() was taking an int8 argument by mistake. Fixed.

New in MUSCLE 4.51 (Mar 21, 2009)

  • This release adds better UDP support to the Java classes, a SegmentedStringMatcher class for convenient wild-card matching on segmented path strings, a number-aware string comparison function, and various other minor features and bugfixes.
  • The Java classes have been repackaged from com.lcs.* to com.meyer.* to reflect a company name change.

New in MUSCLE 4.50 (Jan 29, 2009)

  • - NullDataIO's constructor now takes an optional ConstSocketRef argument, to let you specify the value that its GetSelectSocket() method should return.
  • Added a GetMessageFromPool(const ByteBuffer &) inline convenience function.
  • Added another AddNewSession() convenience method to the MessageTransceiverThread class.
  • In the Message class, MoveName(), CopyName(), and ShareName() all now take an optional target-field-name parameter, in case you want to have a different field name in the target Message.
  • Added an EnsureFieldIsPrivate(const String & fieldName) method to the Message class. This method is useful to avoid side effects when modifying possibly-shared Message fields' contents.
  • Added an "cleanup callbacks queue" to the CompleteSetupSystem class, so that you can specify actions that should be taken as part of the CompleteSetupSystem destructor's cleanup steps.
  • Added a static GetCurrentCompleteSetupSystem() method to the CompleteSetupSystem class, to make it easier for code to find the current CompleteSetupSystem object.
  • Added MUSCLE_CATCH_SIGNALS_BY_DEFAULT #ifdefs... if this is set, ReflectServer will enable Control-C detection (and graceful shutdowns) by default.
  • GetOSName() now accepts an optional string value to return in the case where it can't determine the local OS name.
  • Added a MUSCLE_UNIQUE_NAME macro to MuscleSupport.h which will evaluate to a unique identifier based on the line number that the macro is invoked on.
  • Added a DECLARE_ANONYMOUS_STACK_OBJECT macro to MuscleSupport.h to allow easy declaration of anonymous objects on the stack.
  • Added util/BatchOperator.h, which contains the BatchOperator and BatchOperatorGuard utility classes that help automate the amortization of setup/shutdown routines across a nested call tree, for more efficient batch processing.
  • Added a DECLARE_BATCHGUARD() macro for each declaration of batched areas of code.
  • Added a DECLARE_MUTEXGUARD(m) macro to support declaring an anonymous MutexGuard on the stack in a simple and foolproof way.
  • hexterm now automatically enables the UDP broadcast flag on its UDP socket when the specified UDP address is a broadcast address.
  • Added a Cloneable interface in util/Cloneable.h, and updated ConstRefCount::EnsureRefIsPrivate() to use it when appopriate.
  • Added a Clone() method to the ConstRefCount class, for easy copying of referenced items.
  • Redesigned hexterm to be Win32 compatible.
  • Added a hexterm.vcproj file to the tests folder, to compile hexterm under Win32/VC++.
  • Added a "child=" option to hexterm so it can spawn and communicate with a child process if you want it to.
  • Added a "ascii" keyword argument to hexterm so you can send and receive data in ASCII format rather than hex, if you prefer.
  • Added LogHexBytes() functions to MiscUtilityFunctions.h. These are the same as PrintHexBytes() except that they call through to Log() instead of directly to fprintf().
  • Added an optional (portRequired) argument to ParseConnectArg().
  • Added SetLogFileName()/GetLogFileName() to util/SysLog.{cpp,h}.
  • Added a standard "logfile" keyword so you can specify the name and/or location of a log file to write the log to.
  • Added a WaitForChildProcessToExit() method to the ChildProcessDataIO class.
  • Added ChildProcessDataIO::System() static convenience methods.
  • Added a Directory::DeleteDirectory() static convenience method.
  • Rolled in Mika Lindqvist's Haiku-compatibility patches.
  • Renamed the standard "log" and "display" keywords to "filelevel" and "displaylevel", respectively.
  • Removed the OutOfMemoryCallback and FunctionOutOfMemoryCallback classes and replaced them with more general-purpose GenericCallback and FunctionGenericCallback classes.
  • Tweaked a call to FD_ISSET() in system/Thread.cpp in order to avoid a compiler warning under g++ 4.3.1
  • Tweaked the _PLOCKimp and _PUNLOCKimp debug functions to compile properly in 64-bit environments.
  • Updated the Message.h doxygen documentation with some more descriptive parameter names.
  • hexterm no longer disables multicast-to-self when sending multicast UDP packets.
  • Removed DebugTimer.cpp; that code has moved to SetupSystem.cpp.
  • Updated all copyright notice headers to read 2000-2009 Meyer Sound.
  • DebugTimer now uses GetRunTime64() if MUSCLE_USE_LIBRT is defined.
  • Fixed some #ifdef problems involving the stat64() call in FilePathInfo.h. FilePathInfo.h should now compile under both 32-bit and 64-bit environments.
  • JeffK added a macosx.mak file to the muscle/zlib/zlib folder, to support creation of universal binaries that include zlib.
  • MuscleSupport.h now checks a much more exhaustive list of Intel-compatible processor-type macros before deciding that inline x86 assembly code is not an option. In particular, compiling with an __i686__ target now does the right thing.
  • Fixed a potential infinite recursion in Thread::WaitForNextMessageAux().
  • Tweaked the SharedMemory.h include directives to compile more reliably under Win32.
  • Updated the #ifdefs in MuscleSupport.h to define int64's and uint64's properly under 64-bit Ubuntu Linux.
  • Rewrote the Win32 implementation of StdinDataIO to be simpler and more reliable.
  • The Win32 implementation of the INT64_FORMAT_SPEC macros was incorrect. Fixed it to do the right thing.
  • Made ChildProcessDataIO::LaunchChildProcess() const-correct.
  • ChildProcessDataIO::LaunchChildProcess() now specifies the application name to launch, when possible, for better security. (See Microsoft's CreateProcess() man page for details)

New in MUSCLE 4.41 (Nov 18, 2008)

  • This release adds AddArchiveMessage(), FindArchiveMessage(), and other convenience methods for easier archiving of objects to messages and back.
  • It also redoes the human-readable time values interface to use a class instead of individual value arguments, and fixes several small bugs.

New in MUSCLE 4.40 (Oct 17, 2008)

  • This version now has the concept of ConstRef objects in addition to Ref objects (to make it clear that the referenced object really shouldn't be modified).
  • It has an AsyncDataIO facade class that lets you transparently run any DataIO object in its own thread, plus various other minor features and bugfixes.

New in MUSCLE 4.30 (Sep 19, 2008)

  • This release rewrites the Pulse()/GetPulseTime() callback API, adds some support for sharing data fields between messages, and has various other minor enhancements.

New in MUSCLE 4.28 (Aug 27, 2008)

  • This release compiles again under Win32.
  • A fork() vs forkpty() option has been added to the ChildProcessDataIO class.
  • Directory and FilePathInfo classes have been added.
  • There are other minor changes.