"Fossies" - the Fresh Open Source Software Archive 
Member "muscle/HISTORY.txt" (21 Nov 2020, 389949 Bytes) of package /linux/privat/muscle7.62.zip:
As a special service "Fossies" has tried to format the requested text file into HTML format (style:
standard) with prefixed line numbers.
Alternatively you can here
view or
download the uninterpreted source code file.
For more information about "HISTORY.txt" see the
Fossies "Dox" file reference documentation and the latest
Fossies "Diffs" side-by-side code changes report:
7.61_vs_7.62.
1
2 This file contains the version history/change log for this software.
3
4 key: - new feature
5 * bug fixed
6 o other
7
8 7.62 - Released 11/20/2020
9 - Added a ToBinaryString() convenience-method to the BitChord class.
10 - Updated TarFileWriter so that it can now write using non-seekable
11 DataIO objects as well as SeekableDataIO objects (although with
12 non-seekable you have to explicitly specify the file sizes up-front)
13 - Updated the captive zlib implementation to the latest (v1.2.11)
14 - Added CallFlattenHeaderAndMessage() and CallUnflattenHeaderAndMessage()
15 convenience-methods to the MessageIOGateway class.
16 - Added a GZDataIO class to the zlib folder, as quick way to wrap
17 the gzread()/gzwrite() API inside a DataIO interface.
18 o Modified CMakeList.txt to avoid policy warnings under Windows.
19 * Fixed pointer-casting in Windows call to SetWindowLongPtr()
20 * Fixed a bug where String::WithoutSuffix() and String::WithoutPrefix()
21 would spin the CPU if they were passed an empty String as an argument.
22 Now these methods immediately return (*this) in that case, instead.
23
24 7.61 Released 8/5/2020
25 - Removed MUSCLE's requirement that indexed-child-nodes'
26 node-names must start with the capital letter I. Now
27 any name is acceptable for use as an indexed-child-node.
28 - Added a new Arg(double, uint32, uint32) overload to the
29 String class, which can yield better floating-point-to-String
30 formatting than the standard printf() specifiers provide.
31 - muscleMin(), muscleMax(), and various other inline functions
32 in MuscleSupport.h are now tagged as MUSCLE_CONSTEXPR
33 so that they can be evaluated at compile-time when possible.
34 o muscleArrayIndexIsValid now returns false if the passed-in
35 array-pointer is NULL.
36 * Fixed a warning in the CMakeLists.txt that would occur
37 on build systems that don't have Qt installed.
38
39 7.60 Released 6/25/2020
40 - Added a "daemonsitter" program to the tests folder, to
41 demonstrate how to use MUSCLE to babysit a litter of child
42 processes.
43 - Added a ChildCountQueryFilter class, for constructing
44 QueryFilters that take the number of child nodes of
45 a DataNode into account when deciding on a match.
46 - Merged in Richard Spindler's addition of CMakeList.txt
47 files so that the Qt example programs are now built
48 via cmake when possible, and also so that MUSCLE's
49 Qt support code is built into a separate qtsupport
50 library.
51 - Added an optional (prepend) argument to the
52 AssembleBatchMessage() utility function.
53 - SimulatedMulticastDataIO now tries to send a test
54 UDP packet on its UDP socket before committing to
55 use it.
56 - Updated server/Makefile to conditionally build for
57 Catalyst based on presence of ENABLECATALYST env-var.
58 - Added a testserverthread.cpp program to the tests
59 folder to test/demonstrate launching a child thread
60 that runs its own ReflectServer event loop, and how
61 the main thread can send Messages to it
62 - Added a GetEffectiveParameters() convenience method
63 to the StorageReflectSession class.
64 o Modified StorageReflectSession::SetDataNode(),
65 RestoreNodeTreeFromMessage(), and CloneDataNodeSubree()
66 to take a bit-chord of SETDATANODE_FLAG_* bits rather
67 than an error-prone list of boolean arguments.
68 o Added a dummy symbol to GlobalMemoryAllocator.cpp
69 to avoid a "GlobalMemoryAllocator.o has no symbols" warning
70 o Modified CMakeLists.txt to use WITH_MUSCLED option instead
71 of BUILD_MUSCLED environment variable.
72 o Changed MessageIOGateway's MessageFlattenedCallback's
73 return type from void to status_t, so that the callback
74 can affect whether the Message goes out or not.
75
76 7.55 Released 5/7/2020
77 - Rewrote DetectNetworkConfigChangesSession's Windows
78 and Mac implementation to use a single thread for all
79 DetectNetworkConfigChangesSessions in the process,
80 rather than one thread per DetectNetworkConfigChangesSession.
81 - Added a Python implementation of the BitChord class to
82 python/bit_chord.py
83 - Added PutFlat() and GetFlat() convenience methods to the
84 Python Message class in message.py
85 - Added SegmentedStringMatcher to the libmuscle.a build.
86 - Added some experimental support for building libmuscle.a as
87 a Catalyst-compatible library (see server/Makefile)
88 - Added GetAndClearBit(), GetAndSetBit() and GetAndToggleBit()
89 convenience methods to the BitChord class.
90 - Added a SetErrno(int) function to MuscleSupport.h, to
91 complement the existing GetErrno() function.
92 - Added muscleproxy.cpp to the tests sub-folder, as simple
93 demonstration of how to implement a proxy using MUSCLE.
94 - Added a MoveIndexEntries() convenience method to the
95 StorageReflectSession class.
96 - Added CAddArchiveMessage() and CPrependArchiveMessage()
97 convenience methods to the Message class.
98 - Added an optional (maxSegments) argument to the SetPattern()
99 method of the SegmentedStringMatcher class.
100 - Added a "Clone Window" button to the qt_muscled_browser GUI.
101 - Made qt_muscled_browser's stdout output prettier.
102 o Modified SendDataUDP() so that when it returns, errno is
103 still set to the state that the sendto() call set it to.
104 o Moved the NODE_DEPTH_* enum out of the StorageReflectSession
105 class and up into muscle-namespace scope, so that it
106 can be referenced by non-StorageReflectSession code.
107 * Added a work-around to SimulatedMulticastDataIO for the
108 occasional MacOS/X bug that causes SendDataUDP() to always
109 return ENOBUFS on a Wi-Fi device's socket. This won't fix
110 the underlying problem in MacOS/X, but it will at least
111 keep SimulatedMulticastDataIO from spinning a core at 100%
112 when the fault occurs.
113
114 7.54 Released 3/20/2020
115 - Added a B_ERRNUM(e) macro that works similarly to B_ERRNO, except
116 it calls strerror() with the passed-in integer value rather than
117 calling strerror(errno).
118 - Added a TryLock() method to the Mutex class.
119 - Added a WithReplacements() method to the String class that takes
120 a (const Hashtable<String,String> &) argument, for doing multiple
121 simultaneous search-and-replace operations at one time.
122 * Fixed the handling of RTM_NEWADDR and RTM_DELADDR messages in the
123 Linux implementation of DetectNetworkConfigChangesSession.
124 * Tweaked the Windows #ifdef's in ChildProcessDataIO.cpp per Mika
125 * Return values of pthreads functions weren't being used correctly
126 to set status_t results on error. Fixed.
127
128 7.53 Released 2/13/2020
129 - Added a new FlushOutput() virtual method to the
130 AbstractMessageIOGateway class, in case a subclass
131 needs to hook into the gateway's flush-output functionality.
132 - Added a ParseArgs(const Queue<String> &, Message &, bool)
133 convenience-method to MiscUtilityFunctions.{cpp,h}.
134 - hexterm now reports more details about certain network errors.
135 - Updated the MacOSX/iOS implementation of GetNetworkInterfaceInfos()
136 to call ioctl(SIOCGIFFUNCTIONALTYPE) to disambiguate the device-type
137 of a network-interface device.
138 o Added the MUSCLE_CONSTEXPR tag to the TimeUnitConversionFunctions
139 so that they can be evaluated at compile time when possible.
140 o Modified SharedFilterSessionFactory.cpp to treat an all-zeros
141 shared memory region the same as a non-existent one (so that
142 we no longer have to delete the memory region just to return the
143 filter's behavior to its default state)
144 o Moved the FlushOutput() calls for the gateway classes up into
145 AbstractMessageIOGateway::DoOutput() so that it only needs to
146 be implemented in one place rather than separately in each subclass.
147 o Modified the gateway classes to fail gracefully if GetDataIO()
148 returns a NULL reference, instead of dereferencing a NULL pointer.
149 o Updated the friend-template workaround in Hashtable.h to apply
150 to all versions of GCC, to avoid having to update the code
151 every time a new version of GCC comes out with the bug still unfixed.
152
153 7.52 Released 11/28/2019
154 - Enabled bitcode-generation for iOS in the CMakeLists.txt file.
155 - Added SetSocketCorkAlgorithmEnabled() and GetSocketCorkAlgorithmEnabled()
156 functions to the NetworkUtilityFunctions API (currently implemented
157 for Linux, BSD, and MacOS/X)
158 - TCPSocketDataIO::FlushOutput() now also calls also the new
159 SetSocketCorkAlgorithmEnabled() function for better efficiency.
160 o Moved inline code out of TCPSocketDataIO.h, UDPSocketDataIO.h,
161 ByteBufferDataIO.h, and FileDataIO.h and into corresponding .cpp files.
162 o Split hexterm's "file=blah" argument into "rfile=blah" and "wfile=blah"
163 to allow hexterm to also write hex bytes into a file.
164 o Replaced explicit type-comparisons in message.py with calls to isinstance().
165 o message.py now tests sys.byteorder to determine the native CPU's endianness
166 * PlainTextMessageIOGateway wasn't calling FlushOutput() on its DataIO
167 object at the appropriate times. Fixed.
168 * Removed some obsolete backwards-compatibility-with-early-Python-2.x
169 code from the python3/message.py class.
170 * Refined the exception-handling in message_transceiver_thread.py
171
172 7.51 Released 10/22/2019
173 - Added a MUSCLE_ENABLE_AUTHORIZATION_EXECUTE_WITH_PRIVILEGES
174 compile-time flag and a SetRequestRootAccessForChildProcessEnabled()
175 method to the ChildProcessDataIO class that will be available
176 only on MacOS/X and only if the compile-time flag was specified
177 when compiling MUSCLE. The new method tells the ChildProcessDataIO
178 class to launch the child process as a privileged/root-level process
179 (and causes the OS to prompt for the user's password before allowing that)
180 - Moved the time-unit-conversion helper-functions into their own
181 separate header file (util/TimeUnitConversions.h), and implemented
182 the full matrix of possible unit-conversions within the set of
183 supported time-units.
184
185 7.50 Released 9/25/2019
186 - Merged in some iOS-compatibility patches supplied
187 by Arno Gramatke. The CMakeLists.txt now does the
188 right thing for iOS, and several non-iOS-supported
189 classes (i.e. DetectNetworkConfigChangesSession
190 and RS232DataIO) now compile under iOS as dummy/no-op
191 classes, rather than breaking the build.
192 - Added a B_ERRNO macro which is similar to B_ERROR,
193 except it automatically references the current
194 errno-string, as returned by strerror(errno).
195 - Added various status_t error-constants for "common"
196 error types, such as B_BAD_ARGUMENT, B_DATA_NOT_FOUND,
197 B_OUT_OF_MEMORY, B_FILE_NOT_FOUND, etc. See
198 support/MuscleSupport.h for the full list.
199 - Added IsOK(status_t &) and IsError(status_t &) methods
200 to the status_t class, to support short-circuit logic
201 chains that return an error-description string
202 (see test/teststatus.cpp for examples)
203 - Added a RETURN_OUT_OF_MEMORY macro to formalize the
204 common "WARN_OUT_OF_MEMORY; return B_OUT_OF_MEMORY;" couplet.
205 - Merged in Mika Lindqvist's patch for VS2019 and ARM64.
206 o Instead of an enum/int, the status_t class now holds a
207 (const char *) containing a human-readable description
208 of the error that occurred (or a NULL pointer to indicate
209 that the operation succeeded).
210 o B_ERROR now optionally takes a (const char *) argument
211 specifying a human-readable error-string describing
212 the error that occurred.
213 o Updated the codebase to return more specific status_t
214 error strings when possible (instead of only B_ERROR).
215 o Updates the codebase so that LogTime() calls reporting
216 an error now include the state-string of the relevant
217 status_t variable, when applicable.
218 o The Mutex, SharedMemory, TarFileWriter, and ZLibCodec
219 classes all now now inherit from NotCopyable.
220 * Updated the friend-template work-around in Hashtable.h
221 to include g++ 8.3.x
222 * Fixed an output-formatting bug in test/readmessages.cpp
223 * Fixed a bug in test/readmessage.cpp that could cause
224 readmessage to crash when reading an invalid file.
225
226 7.41 Released 8/8/2019
227 - Added a SwapContents() method to the StringMatcher class,
228 and also a move-constructor and a move-assignment-operator.
229 - The CMakeLists.txt file can now take an optional
230 -DBUILD_MUSCLED=OFF argument, for use-cases where
231 the user wants only muscle.lib to be built and not muscled.
232 - The Cloneable interface class now includes logic to verify
233 that the object returned by Clone() is of the correct
234 subclass, and will trigger an assertion-failure if it isn't.
235 - Added a test/testclone unit-test program to test Cloneable.
236 o Moved AbstractReflectSession::GetTypeName() up into the
237 ServerComponent superclass, and gave it a default implementation
238 (based on RTTI) so that it no longer needs to be implemented
239 manually by every subclass.
240
241 7.40 Released 7/23/2019
242 - Added an AndQueryFilter class, for better ease-of-use.
243 - Added an OrQueryFilter class, for better ease-of-use.
244 - Added a NandQueryFilter class, for better ease-of-use.
245 - Added a NorQueryFilter class, for better ease-of-use.
246 - Added IsKeyLocatedInThisContainer() and
247 IsValueLocatedInThisContainer() methods to the
248 Hashtable class (to match the IsItemLocatedInThisContainer()
249 method already present in the Queue class)
250 o Renamed the existing AndOrQueryFilter class to
251 MinimumThresholdQueryFilter. This class now serves as the
252 superclass of the AndQueryFilter and OrQueryFilter classes.
253 o Renamed the NandNotQueryFilter class to
254 MaximumThresholdQueryFilter. This class now serves as the
255 superclass of the NandQueryFilter and NorQueryFilter classes.
256 o Tweaked some #ifdefs so that MUSCLE code can be compiled
257 to WebAssembly using Emscripten.
258 o Added support for a -DMUSCLE_USE_DUMMY_DETECT_NETWORK_CONFIG_CHANGES_SESSION
259 build-flag, for easier test-building on systems that aren't
260 currently supported by the DetectNetworkConfigChangesSession
261 * Rewrote testqueryfilter.cpp to unit-test the new classes.
262 * Fixed some compiler-warnings in the included Qt-examples.
263 * Various style tweakages in response to suggestions generated
264 by GitHub CodeFactor
265 * Added the 'class' keyword to a couple of friend-declarations
266 in SSLSocketDataIO.h, since pre-C++11 compilers require it.
267 * Fixed a use-after-free bug that could occur when the
268 Hashtable class's Put() methods needed to allocate a
269 larger internal array to hold the new item, AND the
270 passed-in value-argument was a reference to an object
271 that was located within the Hashtable's old data-array.
272 * Fixed a bug similar to the above in the Queue class's
273 AddHead*() and AddTail*() methods.
274
275 7.31 Released 7/11/2019
276 - Updated muscled.cpp and portablereflectclient.cpp so that
277 either one can specify public or private keys to load.
278 - Added tests/testhashcodes.cpp, to check the consistency
279 of CalculateHashCode() and CalculateHashCode64() across
280 CPU architectures.
281 o ChildProcessDataIO::ChildProcessReadyToRun() now returns
282 B_NO_ERROR if the child process should run, or B_ERROR
283 if the child process should be aborted.
284 o Modified the Hashtable-templatized-friend workaround to
285 be active on g++ up to v8.2.0.
286 * Fixed a bug that could cause the Message class's equality
287 operator to incorrectly return true in the case where both
288 Message objects are semantically the same, but are pointing
289 to different (yet identical) binary data-buffers.
290 * Fixed some errors and omissions in the README.html file.
291
292 7.30 Released 6/7/2019
293 - Added a GetErrno() function to MuscleSupport.h, as a portable
294 front-end to either errno or WSAGetLastError(), depending on OS.
295 - The tests/readmessage.cpp program now inflates zlib-compressed
296 files, and takes a new optional "sizes" keyword, which, if
297 specified, will cause the program to print a report of how
298 many bytes each sub-Message in the file takes up, sorted by
299 increasing size.
300 - Added a SetPreSharedKeyLoginInfo() method to the SSLSocketDataIO
301 class so that it can now support PSK-based authentication.
302 - Added GetPreSharedKeyUserName() and GetPreSharedKeyPassword()
303 methods to the SSLSocketDataIO class.
304 - Added a SetSSLPreSharedKeyLoginInfo() method (and corresponding
305 GetSSLPreSharedUserName() and GetSSLPreSharedPassword() methods)
306 to the ReflectServer class.
307 - Added a SetSSLPreSharedKeyLoginInfo() method to the
308 MessageTransceiverThread class.
309 - Added a SetPrivateKey(const ConstMessageRef &) convenience
310 method to the SSLSocketDataIO class.
311 - Modified the ReflectServer class so that any combination
312 of public, private, and pre-shared keys can be applied to
313 newly created sessions.
314 o Hashtable.h was using some C++11-specific syntax that would
315 cause a warning to be generated when compiling in C++03 mode. Fixed.
316 o Added an "if(TARGET muscle) return()" idempotency test to
317 the CMakeLists.txt file, to avoid potential cmake errors.
318 o Dropped support for old (pre-1.1.x) versions of OpenSSL
319 from the SSLSocketDataIO class.
320 * The CMakeLists.txt now links in the IOKit framework under MacOS/X.
321
322 7.21 Released 5/7/2019
323 - ChildProcessDataIO::LaunchChildProcess() and friends now
324 take an optional Hashtable<String,String> that, if specified,
325 will be passed to the child process as environment-variables.
326 o Reduced sizeof(Hashtable) by 8 bytes, from 64 to 56.
327 o Queues of very small Item-types (e.g. 1 or 2 bytes per
328 Item) now automatically get larger ACTUAL_SMALL_QUEUE_SIZE
329 values, to take advantage of space that would otherwise be
330 wasted as padding anyway.
331 o Added some indentation-style fixes for member-initializers
332
333 7.20 Released 4/23/2019
334 - Added new convenience methods to the Hashtable class:
335 PutAtFront(), PutAtBack(), PutBefore(), PutBehind(), and
336 PutAtPosition(). (These are variations of Put() that
337 allow the caller to simultaneously specify the desired
338 position of the object in the table's iteration-sequence)
339 - Added a ParseNumericSuffix() method to the String class.
340 - The StringTokenizer class no longer performs a heap
341 allocation when tokenizing short strings.
342 - Added ReadFlat(), WriteFlat(), and AppendFlat() methods
343 to the ByteBuffer class.
344 - Added a Reposition(const KeyType &) method to the
345 OrderedKeysHashtable class.
346 o Added const-qualifiers to more local variables where appropriate.
347 o Refactored the Hashtable class's internal sorting
348 implementation to reduce the amount of redundant code.
349 o Moved all of the auto-sort functionality out of the
350 HashtableBase class and into an OrderedHashtable subclass that
351 OrderedKeysHashtable and OrderedValuesHashtable now derive from.
352 o Hashtable::SwapContents() no longer swaps the values of the
353 auto-sort-enabled flag or the auto-sort-cookie value.
354 o Added some private typedefs to make the Hashtable methods'
355 implementation code less verbose.
356 * Some private members of the HashtableBase class had been
357 declared protected by mistake. Fixed.
358 * Fixed a bug in the Hashtable class that could cause a
359 HashtableIterator to be updated improperly, if the
360 Hashtable was resized during the iteration.
361 * testhashtable's interactive test manually changed the
362 ordering of its OrderedKeysHashtable on startup, breaking
363 the table's automatic-sort functionality. Fixed.
364
365 7.13 Released 4/6/2019
366 - Added <, <=, >=, and > operators to the Queue class, to
367 allow for easy lexicographical comparison of Queues.
368 o Modified SharedFilterSessionFactory::IsAccessAllowedForIP()
369 to be non-static, to avoid having to re-open the shared
370 memory region on every call to the method.
371 o Added const-qualifiers to local variables where appropriate.
372 * Added a missing #include directive to DebugTimer.h
373
374 7.12 Released 2/5/2019
375 - Added a AddConstToRef() convenience-function to RefCount.h,
376 as a counterpart to the existing CastAwayConstFromRef().
377 - NetworkInterfaceInfo::IsCopperDetected() now returns
378 meaningful values under Windows.
379 o Tweaked the code to avoid a few false-positive warnings
380 from Clang Static Analyzer.
381 o Removed SSLSocketDataIO.{cpp,h} from the include XCode
382 project since it is typically not necessary and breaks
383 the build if OpenSSL isn't installed on the host Mac.
384
385 7.11 Released 1/7/2019
386 o Queue:GetWithDefault() methods that
387 take a default-value argument (by-reference)
388 now return their return-value by-value rather
389 than by-reference, to avoid any possibility
390 of returning a dangling reference if they
391 are called with a temporary-object argument.
392 o Hashtable:Get*WithDefault() methods that
393 take a default-value argument (by-reference)
394 now return their return-value by-value rather
395 than by-reference, to avoid any possibility
396 of returning a dangling reference if they
397 are called with a temporary-object argument.
398 * _MSC_VER was misspelled as MSC_VER in
399 PseudoFlattenable.h, causing the code to
400 fail to compile under MSVC2013. Fixed.
401 * Fixed a bug in Mutex.h that would prevent
402 MUSCLE_QT_HAS_THREADS from being correctly
403 #defined if MUSCLE_AVOID_CPLUSPLUS11 wasn't set.
404 * Fixed FileDescriptorDataIO.h to compile
405 correctly under Windows in the case where it
406 is the first muscle-include file to be parsed.
407 * MuscleSupport.h now checks for the presence of
408 _WIN32 (in addition to __WIN32__, etc)
409 * Fixed an assertion failure that could be
410 triggered inside DeadlockFinder_ProcessEnding()
411 if MUSCLE_ENABLE_DEADLOCK_FINDER was defined.
412 * Fixed some warnings generated by clang++ when
413 -Wshadow is specified on the compile line.
414
415 7.10 Released 12/3/2018
416 - Under C++11 and later, the status_t type is now a
417 class rather than a simple typedef for int32. It
418 is used pretty much the same way as before, except
419 now it provides better compile-time error-checking.
420 - Under C++11 and later, the status_t type (and its
421 values B_OK, B_ERROR, and B_NO_ERROR) are now part
422 of the muscle namespace.
423 - Added a WithoutNumericSuffix() convenience method to
424 the String class.
425 - The CMakeLists.txt file has been modified so that it
426 is now usable by CMake 2.8.x and higher.
427 o Functions in the C APIs have been modified to return
428 type c_status_t (CB_ERROR or CB_NO_ERROR) rather than
429 status_t, to avoid ambiguities with the new C++11
430 version of status_t in mixed C/C++11 programs.
431 o BitChord::GetNumBitsInBitChord() and friends are now
432 declared as static/constexpr rather than const methods,
433 so that they can be called at compile-time now.
434 o Replaced the MUSCLE_ENABLE_KEEPALIVE_API compile-flag
435 with a new MUSCLE_DISABLE_KEEPALIVE_API flag (i.e.
436 so that the socket-keepalive API is now enabled by
437 default if neither flag is specified)
438 o DOxygen documentation is now generated with C++11
439 enabled (before it was documenting the pre-C++11 API)
440 * In the BitChord class, GetNumBytesInBitChord() and
441 GetNumWordsInBitChord() were mis-named. Fixed.
442 * Fixed a bug that affected MUSCLE subscriptions that
443 included a QueryFilter: If a DataNode matched a
444 subscription's node-path string, but its Message-payload
445 didn't match the QueryFilter's criteria (at the time the
446 subscription was created), then future modifications to the
447 DataNode would not cause the subscriber to be notified
448 even if the updated Message-payload did change to match
449 the QueryFilter's criteria.
450 * Modified StorageReflectSession::DoSubscribeRefCallback() to
451 take its argument via an object-pointer rather than
452 smuggling an integer delta-value to it inside a (void *).
453
454 7.03 Released 9/28/2018
455 - WarnOutOfMemory() now calls PrintStackTrace() (but not more
456 often than once every 5 seconds, to avoid spamming)
457 - BitChord::ClearUnusedBits() is now O(1) when compiled with C++11.
458 o support/BitChord.h will now fall back to its legacy implementation
459 if MUSCLE_AVOID_CPLUSPLUS11_BITCHORD is defined. (This define
460 will automatically be set if MUSCLE_AVOID_CPLUSPLUS11 is defined)
461 o Removed unnecessary call to ERR_print_errors_fp() from the
462 SSLSocketDataIO constructor.
463 * IPAddress's string-argument-constructor left its fields
464 uninitialized in the case where SetFromString() failed. Fixed.
465 * Fixed a bug in StorageRectSession::DoTraversalAux() that would
466 cause the node-traversal to skip first node-name specified in
467 the second (and later) path-strings in a Message.
468
469 7.02 Released 9/7/2018
470 - Added a function OptimizeMessageForTransmissionToMultipleGateways()
471 that can be used to greatly reduce a server's RAM usage when it is
472 going to send a large Message to multiple clients simultaneously.
473 - Added a function IsMessageOptimizedForTransmissionToMultipleGateways()
474 that will return true iff the specified Message has been tagged already.
475 - Added a GetDistanceTo() method to the String class that
476 returns the Levenshtein distance between two Strings.
477 - Added a GetInitialMemoryUsage() method to the CompleteSystemSystem class.
478 - Added a GetProcessMemoryUsage() function to MiscUtilityFunctions that
479 returns the current process's approximate resident heap-size, in bytes.
480 - Added a CreateConnectedSocketPair() convenience function
481 to message_transceiver_thread.py.
482 - Added AdoptRawDataArray() and ReleaseRawDataArray() methods to
483 the Queue class, so that a Queue can operate using an
484 externally-provided data-array if necessary.
485 o Replaced some #defines in GlobalMemoryAllocator.h with inline
486 functions instead, for more robust parsing.
487
488 7.01 Released 8/22/2018
489 - Added a EuclideanModulo() convenience function
490 to MuscleSupport.h
491 * Fixed some typos in the C++03 implementation of
492 BitChord::FromWords() and BitChord::FromBytes()
493 * Fixed a bug in Hashtable::MoveToPosition() that
494 would cause it not to correctly position the target
495 item when the specified position was in the latter
496 half of the table's iteration-sequence.
497
498 7.00 Released 8/10/2018
499 - Rewrote the BitChord class to be much more powerful and
500 easy to use (especially in conjunction with an enum
501 of flag-names). The implementation now includes variadic
502 methods (which are emulated via macros if C++11 isn't
503 available), a PseudoFlattenable interface, and a number
504 of new convenience methods.
505 - BitChord now implements HashCode() and can therefore be
506 used as a key-type in a Hashtable.
507 - BitChord now implements CalculateChecksum().
508 - BitChord::ToHexString() now returns a constant-length hex
509 string, instead of returning a string that starts only at
510 the first non-zero byte.
511 - Added a testbitchord.cpp test program to the tests folder.
512 - CleanupDNSLabel() and CleanupDNSPath() now accept an optional
513 second argument specifying additional characters that the
514 filter should allow to remain in the returned String.
515 - Under MacOS/X and BSD, MUSCLE sockets now have the SO_NOSIGPIPE
516 socket-option automatically set on them, to avoid spurious
517 SIGPIPE signals while running inside a debugger.
518 - Updated PythonUtilityFunctions.cpp to be compatible with Python3.
519 o Rewrote the CHILD_PROCESS_LAUNCH_BITS in the ChildProcessDataIO
520 class to use a BitChord typedef (ChildProcessLaunchFlags)
521 instead. Renamed them to CHILD_PROCESS_LAUNCH_FLAG_*.
522 o Removed the "inherit file descriptors" member variable and
523 arguments from the ChildProcessDataIO class and added a
524 CHILD_PROCESS_LAUNCH_FLAG_INHERIT_FDS flag to replace it.
525 o Added a (launchFlags) arg to the LaunchIndependentChildProcess()
526 convenience methods in the ChildProcessDataIO class.
527 o Changed the DATA_FLAG_* bits of the ByteBuffer class to
528 an enum, managed by the EndianFlags BitChord typedef.
529 Renamed them to ENDIAN_FLAG_* for clarity.
530 o Renamed ByteBuffer::SetDataFlags() to ByteBuffer::SetEndianFlags()
531 o BitChord is now implemented using uint32 words rather than
532 unsigned-int words.
533 o Modified the GetNetworkInterfaceInfos() function to take
534 a GNIIBits argument instead of a uint32 (and renamed the
535 GNII_* enums to GNII_FLAG_*)
536 o Renamed BitChord::GetBit() to BitChord::IsBitSet()
537 o Removed the inclusion of CoreFoundation/CFRunLoop.h
538 from DetectNetworkConfigChangesSession.h since having
539 it there could cause a namespace collision with Apple's
540 Point class.
541 o The ARRAYITEMS() templated method (in MuscleSupport.h)
542 is now declared constexpr under C++11 and higher.
543 o Moved the declaration of the Void class out of
544 util/Hashtable.h and into support/Void.h
545 o Modified the StringMatcher class to use BitChord
546 instead of a uint8 to hold its internal flags.
547 o Modified the FilePathInfo class to use BitChord
548 instead of a uint32 to hold its internal flags.
549 o Replaced the signal(SIGPIPE, SIG_IGN) call inside
550 NetworkSetupSystem with a less problematic call to
551 sigaction(SIGPIPE).
552 o Added some documentation for the BitChord class to
553 the MUSCLE-by-Example mkdocs pages.
554 * Updated the Python3 code in the python3 folder to
555 fix a couple of bugs (caused by code that was correct for
556 Python2 but needed to be written differently for Python3)
557
558 6.91 Released 7/26/2018
559 - Added Pete Goodeve's Python3 port of MUSCLE's existing Python2
560 files (into the new python3 sub-directory)
561 - Added a striphextermoutput utility program to the tests folder,
562 since I'm tired of doing stripping hexterm output by hand.
563 - hexterm now pays attention when you enter a blank line on stdin,
564 and takes that as a hint to break up its output into separate
565 Write() calls (useful when piping striphextermoutput's results
566 back into hexterm, since otherwise the data for separate UDP
567 packets could get combined into a single giant UDP packet, which
568 isn't helpful)
569 - hexterm now takes an optional "delay" argument; if the argument
570 is specified (e.g. "delay=100 milliseconds"), then hexterm will
571 insert a delay of that duration after each call to Write().
572 - MuscleSupport.h now uses stdint.h and inttypes.h by default as
573 the basis for its int8/int16/int32/int64/etc typedefs, rather
574 than trying to hand-roll them from the built-in C/C++ int/long
575 types. If for some reason you can't use that, you can add the
576 compiler flag -DMUSCLE_AVOID_STDINT to your command line and
577 the old approach will be used instead.
578 - Added SFINAE logic to the CloneObject() function (in Cloneable.h)
579 so that (on C++11 and later) it now works correctly for objects
580 that inherit Cloneable and also concrete objects that do not.
581 - MuscleSupport.h now uses static_assert() to verify type sizes,
582 if possible.
583 - MicroMessage.c and MiniMessage.c now have pseudo-static-asserts
584 so that they will generate compile-time errors if any of of the
585 intN typedefs have the wrong size.
586 - Added PutAndGetKey() convenience methods to the Hashtable class.
587 (They work the same as PutAndGet(), except they return a pointer
588 to the key object in the table, rather than the value object)
589 * Fixed a bug that would cause Ref::Clone() to return a
590 default-initialized item (rather than a clone of the existing item)
591 if it was called on an object being managed by an ObjectPool.
592 * Fixed a bug that would cause MuscleSupport.h to implicitly
593 defined MUSCLE_AVOID_CPLUSPLUS11 under MSVC2014/2017. (I made
594 the mistake of thinking that Microsoft would set the value of
595 the __cplusplus macro correctly, but they do not)
596 * The 32-bit/non-stdint typedefs for int32 and uint32 are now
597 based on int (and unsigned int, respectively) rather than
598 long/unsigned long.
599
600 6.90 Released 7/14/2018
601 - Updated SSLSocketDataIO.cpp to compile against newer
602 versions of OpenSSL.
603 - Added GetFirstKeyWithValue() and GetLastKeyWithValue()
604 convenience methods to the Hashtable class.
605 - CopyFile() now takes an optional third argument. The
606 third argument, if set to true, allows CopyFile() to also
607 recursively copy a directory, if the first argument is
608 the path of a directory.
609 o The MicroMessage API was designed in such a way that it was
610 easy to accidentally dereference a misaligned pointer and
611 invoke undefined behavior. I redesigned the API so that
612 misaligned pointers are no longer used or exposed to the
613 calling code, so that the MicroMessage API can now be used
614 e.g. on ARM CPUs.
615 * Fixed MSVC2017 compiler warning in PseudoFlattenable.h.
616 * Fixed a buffer overflow in test/printsourcelocations.cpp
617 * The C-based test programs in the test folder (microchatclient,
618 minichatclient, microreflectclient, and minireflectclient)
619 weren't handling socket-closed/EOF events correctly. Fixed.
620 * Added some code to MiniMessage.c so that data fields will
621 be longword-aligned even if ((sizeof(MMessageField)%8)!=0)
622 * MFree() in the MiniMessage API was defined to return (void *)
623 rather than (void), due to a copy/paste error. Fixed.
624 * Updated the MUSCLE_ENABLE_MEMORY_TRACKING implementations of
625 MAlloc(), MRealloc(), and MFree() to follow strict-aliasing rules.
626 * IPAddressAndPort::WithInterfaceIndex() and
627 IPAddress::WithInterfaceIndex() can now be called even
628 when MUSCLE_AVOID_IPV6 is defined.
629
630 6.85 Released 5/29/2018
631 - Added logic to CMakeLists.txt so that if libz isn't
632 installed on the build-system, it will automatically
633 fall back to using the captive implementation in zlib/zlib.
634 * Fixed a number of minor warnings that appeared when
635 compiling with clang++ and all warnings enabled.
636 * Fixed various typos and grammar problems in the MkDocs files.
637 * Added a sanity-check to Message::Unflatten() so that a
638 serialized Message with an impossibly-large entries-count
639 field will error out cleanly, rather than attempt to allocate
640 an impossibly-large Hashtable and exhaust the host's RAM.
641
642 6.84 Released 5/22/2018
643 - Added support for a -DMUSCLE_LOG_VERBOSE_SOURCE_LOCATIONS
644 command-line switch so that the log output can contain
645 full filename/line-number info, if desired.
646 - ReflectServer::ServerProcessLoop() will now print warnings
647 if it sees a session with no writeable socket and an
648 outgoing Message queue that keeps getting longer and longer.
649 o Added proper settings to the other build permutations in
650 the .vcxproj files in the muscle-by-example/examples/vc++14
651 folder.
652 * Win32AllocateStdioConsole() no longer attempts to redirect
653 both stdout and stderr to the same file when a filename is
654 supplied as its argument (because Windows apparently doesn't
655 support that). Instead, a separate xxx_stderr.txt file is
656 created to hold the stderr output.
657
658 6.83 Released 5/3/2018
659 - Rewrote the String::*IgnoreCase() methods to be more efficient
660 (they no longer call ToLowerCase()).
661 - Added Strcasestr() and StrcasestrEx() helper-functions to
662 String.{cpp,h}.
663 - Added a vc++14 sub-directory to the muscle-by-example\examples
664 folder. It contains a .sln, .vcxproj files, and a BUILD_ALL.bat
665 file, so that the "MUSCLE by Example" programs can be built
666 using Visual Studio 2015 (or higher).
667 * Added some missing .c and .cpp files to the the Visual
668 Studio projects in the vc++14 folder so that the
669 muscle-by-example example programs can all link.
670 o Improved the DOxygen-documentation and code-formatting in
671 String.{cpp,h} a bit.
672 o Modified several of the muscle-by-example example programs so
673 that they will compile and run even when C++11 support isn't
674 enabled.
675 o The Windows implementation of GetSystemPath() no longer calls
676 PathRemoveFileSpecA(), which means programs including
677 GetSystemPath() will no longer need to link to Shlwapi.lib.
678 o Added a TimeSetupSystem class (part of CompleteSetupSystem)
679 so that GetRunTime64() doesn't have to demand-calculate
680 clock-frequencies on its first call.
681
682 6.82 Released 4/25/2018
683 o test/Makefile-mt no longer tries to compile testreflectsession
684 except when executing on an OS that testreflectsession supports.
685 o Did some minor editing and re-arranging of the "MUSCLE by Example" pages.
686 o Replaced a number of `tags` in the MkDocs with [URLs](...)
687 o Removed private-inheritance of CountedObject from all the classes
688 that had it -- now they include a CountedObject private member
689 variable instead. This was done only because all that private
690 inheritance was cluttering up the DOxygen inheritance graphs.
691 o Added a DECLARE_COUNTED_OBJECT macro to CountedObject.h so that
692 any potential memory-overhead of CountedObjects can be eliminated
693 in cases where object-counting is not desired.
694 o Removed support for the -DMUSCLE_AVOID_OBJECT_COUNTING and added
695 a -DMUSCLE_ENABLE_OBJECT_COUNTING macro in its place. (That is,
696 the CountedObject class is now disabled-by-default and must be
697 explicitly enabled in order to use it)
698 o Added "MUSCLE by Example" documentation for MiscUtilityFunctions.{cpp,h}
699 * Changed a number of `tags` in the MUSCLE-by-Example MkDocs source
700 into [urls] so that the methods they mention can be quickly reviewed.
701 * server/Makefile now specifies libmuscle.a after the main() .o file.
702 * Fixed some gcc warnings in the tests folder (per Mika's suggestions)
703 * UnparseFile() wasn't quoting keywords with spaces properly. Fixed.
704 * Fixed the dependencies in the "MUSCLE by Example" examples' Makefiles.
705
706 6.81 Released 4/11/2018
707 - Added a "StorageReflectSession Message Types" section
708 to the "MUSCLE by Example" mkdocs pages
709 - Added a graphviz diagram to reflectserver.md
710 - Added an "xcode" sub-directory that contains a muscle.xcodeproj
711 project that compiles MUSCLE (contributed by Ruurd Adema)
712 o Added an if-test to TarFileWriter::WriteOctalASCII() to
713 avoid a spurious warning from gcc under Windows (reported by Mika)
714 o muscled and admin now link to libmuscle.a instead of directly
715 to the .o files.
716 o Changed the first parameter of ConvertReturnValueToMuscleSemantics()
717 from (int) to (long) in order to avoid compiler warnings.
718 * Merged in a number of patches from Ruurd Adema that fix compiler
719 warnings and errors in DOxygen comments. (Thanks Ruurd!)
720 * muscle/server/Makefile was inappropriately including muscled.o
721 in the libmuscle.a library. Fixed.
722 * muscle/server/Makefile was specifying certain build-flags twice. Fixed.
723 * Fixed a bug where the new item added by the zero-arguments
724 versions of Queue::AddTail() and Queue::AddHead()
725 was not being reliably default-initialized.
726 o Added a note to the zero-argument Queue::AddTailAndGet()
727 and Queue::AddHeadAndGet() methods' documentation that for
728 POD ItemTypes, the value they return a pointer to may not
729 be in an initialized state.
730
731 6.80 Released 4/2/2018
732 - Added the html/muscle-by-example tour MkDocs-source sub-directory.
733 - Added ReadFrom() and WriteTo() methods to the PacketDataIO API
734 (as convenient alternatives to calling SetPacketDestination()
735 and/or GetSourceOfLastReadPacket())
736 - PlainTextMessageIOGateway now properly supports packet-based I/O.
737 - MessageIOGateway, PlainTextMessageIOGateway, and
738 RawDataMessageIOGateway all now support a
739 PR_NAME_PACKET_REMOTE_LOCATION field which can be used to
740 determine a UDP packet's source and/or destination when the
741 gateway is being used in conjunction with a PacketDataIO.
742 - Added a GetFieldTypeForName(const String &) convenience method to
743 the Message class.
744 - Added an IPAddress(const String &) constructor.
745 - Added a GetPrettyTypeCodeString() function to Message.h, that returns
746 a String object (instead of writing into a char[] buf), because really.
747 - Added the IHostNameResolver interface, and the PutHostNameResolver(),
748 RemoveHostNameResolver(), and ClearHostNameResolvers() functions,
749 so that programs can add their own custom back-end functionality
750 to the GetHostByName() function if they want to.
751 - Added a GetHostByNameNative() function that does hostname lookup
752 without any IHostNameResolver callbacks.
753 - Added a Set() method to the IPAddressAndPort class.
754 o Changed UDPSocketDataIO::Write()'s multi-target behavior to
755 try to send to all targets even if some of the sends fail.
756 o Moved SeekableDataIO and PacketDataIO subclasses into their
757 own separate header files.
758 o Updated test/testudp.cpp to support PlainTextMessageIOGateway also.
759 * Fixed hexterm.vcproj to include some .cpp files that were missing.
760 * muscled and libmuscle.a are now compiled without the
761 -DMUSCLE_SINGLE_THREAD_ONLY and -DMUSCLE_ENABLE_MEMORY_TRACKING
762 flags, so that libmuscle.a can be used as-is in more projects.
763 * The PRINT_CALLS_PER_SECOND macro in TimeUtilityFunctions.h was
764 broken, and printed more often than it was supposed to. Fixed.
765 * Fixed a bug in SysLog.cpp's log-rotator code that could cause
766 it to delete log-files prematurely under certain circumstances.
767 * Fixed a bug that could cause Message::FindData(fn, B_ANY_TYPE, ...)
768 to crash.
769 * Added a number of additional .cpp files to the libmuscle.a
770 file generated in the server folder.
771 * Fixed an out-of-date comment in StdinDataIO.h
772 * Half-specified numeric-range clauses in StringMatcher strings
773 weren't being matched correctly. Fixed.
774 * The default value of the (launchBits) argument in some of the
775 ChildProcessDataIO::System() methods was set incorrectly. Fixed.
776
777 6.72 Released 1/5/2018
778 - MUSCLE_AVOID_CPLUSPLUS11 will now be #defined automatically
779 inside MuscleSupport.h if it wasn't explicitly specified AND
780 the __cplusplus preprocessor token is defined to a value
781 smaller than 201100.
782 - Added a muscleClearArray() templated convenience functions to
783 MuscleSupport.h
784 o Fixed a deprecation warning for kSCNetworkInterfaceTypePPTP in
785 NetworkUtilityFunctions.cpp (MacOS/X only)
786 o AtomicCounter.h and Mutex.h will now use the corresponding
787 C++11 APIs in their internal implementation unless
788 MUSCLE_AVOID_CPLUSPLUS11 is defined.
789 o Added logic to detect XCode versions before 8.0 and auto-enable
790 MUSCLE_AVOID_CPLUSPLUS11_THREAD_LOCAL_KEYWORD when they are
791 detected, since XCode's clang++ didn't support the thread_local
792 keyword before XCode 8.0.
793 * Fixed compile error in AtomicCounter.h if C++11 was enabled
794 and also MUSCLE_SINGLE_THREAD_ONLY was defined.
795
796 6.71 Released 11/3/2017
797 - Added a GetFieldType() method to the MessageFieldNameIterator
798 class, for convenience.
799 - Added a 'writeToStdout' argument to StdinDataIO's constructor so
800 that StdinDataIO can optionally Write() data to stdout as well.
801 (The argument defaults to false, for backwards compatibility)
802 - SanitySetupSystem now verifies that sizeof(void*)'s value
803 corresponds correctly to the presence/absence of the
804 MUSCLE_64_BIT_PLATFORM macro, and panics if it doesn't.
805 - Added constructors to MultiQueryFilter (and its subclasses)
806 that take a std::initializer_list of child ConstQueryFilterRef's,
807 for convenience. (requires C++11 or later to use)
808 o CMakeLists.txt now includes the files in the dataio subdirectory
809 as part of muscle.lib (except for SSLSocketDataIO.cpp, to avoid
810 creating a hard-coded OpenSSL dependency)
811 o Removed the 32-bit-specific implementation of CalculateHashCode64();
812 now the 64-bit is used on both 32-bit and 64-bit CPUs so that
813 the function will give the same results regardless of platform.
814
815 6.70 Released 10/17/2017
816 - The ReflectServer class, if a DetectNetworkConfigChanges session
817 is attached to it, will now automatically disconnect any non-local
818 TCP connections just before the local computer goes to sleep, in
819 order to avoid saddling any communicating peers with a moribund
820 TCP connection. It will reconnect them, if possible, after the
821 computer re-awakes.
822 - The DetectNetworkConfigChangesSession constructor now takes
823 an optional argument indicating whether or not its presence
824 should enable the behavior described in the previous bullet-point.
825 Defaults to true, but can be explicitly set false if you don't want
826 the new behavior for some reason.
827 - Added a back-end for the Thread class that uses C++11's std::thread
828 - Added a back-end for the Mutex class that uses C++11's std::recursive_mutex
829 - Added a back-end for the ThreadLocalStorage class that uses
830 C++11's thread_local keyword.
831 - Added a CMakeLists.txt file to the root directory, for those who
832 prefer to compile a basic MUSCLE library and muscled using cmake
833 (e.g. "cd muscle; mkdir _build; cd _build; cmake ..; make")
834 - Added a IsSelfAssigned() convenience method to the IPAddress class.
835 - Added FindFirstSessionOfType() and FindSessionsOfType() convenience
836 methods to the ReflectServer class.
837 o Moved the INetworkConfigChangesTarget interface out of
838 DetectNetworkConfigChanges.h and into its own separate header file.
839 o MUSCLE now requires a C++11 compiler by default. If you want to
840 compile MUSCLE using an older (pre-C++11) compiler, you'll need to
841 explicitly add -DMUSCLE_AVOID_CPLUSPLUS11 to your compile-flags.
842 o MuscleSupport.h now automatically defines -DMUSCLE_USE_CPLUSPLUS11_THREADS
843 if neither MUSCLE_AVOID_CPLUSPLUS11 nor MUSCLE_AVOID_CPLUSPLUS11_THREADS
844 has been defined.
845 o Checks for -DMUSCLE_USE_CPLUSPLUS11 have been removed, because
846 C++11 is now the default compiler level. C++11-specific code is
847 now guarded by #ifndef MUSCLE_AVOID_CPLUSPLUS11 instead.
848 o Removed the "borland" subdirectory since it's obsolete.
849 o Removed the deprecated SetReflectToSelf() and GetReflectToSelf()
850 methods from the DumbReflectSession class.
851
852 6.62 Released 9/14/2017
853 o Moved constructor-arguments in the .cpp files to separate lines,
854 for better diff-ability when they are modified.
855 o Removed the overrides of String::StartsWith() that took an
856 offset parameter, since it doesn't really make sense to check
857 for a prefix with an offset.
858 o Fixed some warnings flagged by clang++'s -Weverything option
859 o Lots of miscellaneous Doxygen header-comment fixes and cleanup
860 o Added a DoxyTemplates.h header file to serve as a repository
861 of common class-member definitions, to avoid repetitive boilerplate.
862 o Modified String::operator==() to call memcmp() rather than strcmp()
863 * Improved portablereflectclient's string parsing a little.
864 * Added "const" tag to several operators in the IPAddress class
865 that were supposed to have it, but didn't.
866
867 6.61 Released 7/21/2017
868 - Added a WithInterfaceIndex() convenience method to the IPAddress
869 class (for consistency with the IPAddressAndPort class's API)
870 * Fixed a sign-casting error in ParseHumanReadableSignedTimeIntervalString()
871 under Windows. Thanks to Mika Lindqvist for reporting this error.
872 * Fixed potential crash in GetSystemPath() under MacOS/X.
873 * Fixed the MCRASH macro to explicitly specify muscle::Crash()
874 rather than just Crash(), so that it will work when called from
875 other namespaces.
876
877 6.60 Released 6/22/2017
878 - Added SetPriority() and GetPriority() methods to the Thread
879 class, to allow specification of the CPU-priority a Thread
880 should run at.
881 - SimulatedMulticastDataIO's unicast-ping-packets now contain
882 location information about other members of the group, so that
883 even if some packets get dropped, there is a good chance that
884 all members will end up knowing about of all other members anyway.
885 - Added define MUSCLE_CONSTEXPR that expands to constexpr iff
886 MUSCLE_ENABLE_CPLUSPLUS11 is defined, or expands to nothing otherwise.
887 - Some static methods in IPAddress and IPAddressAndPort are now
888 tagged with MUSCLE_CONSTEXPR so that they can be evaluated
889 at compile-time, if necessary.
890 - Added an optional (roundUp) argument to the
891 GetHumanReadableTimeIntervalString() functions.
892 - Added SetPacketSendDestination() and GetPacketSendDestination()
893 virtual methods to the DataIO class.
894 - Added a ProxyDataIO class that passes through all calls
895 verbatim to its held child DataIO object
896 o Renamed XorDataIO to XorProxyDataIO, and made it a subclass
897 of ProxyDataIO.
898 o Renamed PacketizedDataIO to PacketizedProxyDataIO, and made it
899 a subclass of ProxyDataIO.
900 o Modified the UDPSocketDataIO class to contain the above two
901 virtual methods instead of SetSendDestination() and
902 GetSendDestination()
903 o Renamed the GetSendDestinations() and SetSendDestinations()
904 methods in UDPSocketDataIO to SetPacketSentDestinations() and
905 GetPacketSendDestinations(), respectively.
906 o Added a GetPacketSendDestination() method implementation to the
907 SimulatedMulticastDataIO class.
908 o Removed the GetInternalQThread() virtual method from the
909 Thread class, since there is now a more general (non-Qt-specific)
910 mechanism in the Thread class that can be used instead.
911 o Rewrote SimulatedMulticastDataIO to be simpler and more robust;
912 in particular it now only creates two UDP sockets instead of four.
913 o Removed the FailoverDataIO class, since it didn't seem useful.
914 o Renamed DataIO::GetPacketMaximumSize() to GetMaximuPacketSize()
915 o Split the DataIO class into separate classes: DataIO for
916 basic Read()/Write()-only I/O, SeekableDataIO for file-style
917 I/O where the current-seek-position can be Seek()'d, and
918 PacketDataIO for UDP-style packet-based I/O with explicit
919 source and destination IP addresses.
920 o Modified the various DataIO subclasses as necessary so that
921 they now subclass from the appropriate interface.
922
923 6.50 Released 6/6/2017
924 - Added SimulatedMulticastDataIO, which simulates multicast
925 communication via directed unicast. Useful for communicating
926 multicast-style across a WiFi network, where real multicast
927 communication doesn't work very well.
928 - hexterm now supports a "wifi" keyword, which if specified along
929 with the "udp=address:port" argument will replace the basic
930 UDPSocketDataIO functionality with SimulatedMulticastDataIO,
931 for testing purposes.
932 - Added some additional Inflate() and Deflate() methods
933 to the ZLibCodec class so that it can now write its
934 output into an existing ByteBuffer object rather than
935 allocating a new one from the byte-buffer-pool, if desired.
936 - hexterm now accepts a "verifyspam" argument; if specified,
937 hexterm will check incoming packets to see if they match
938 the dummy-data format sent out by hexterm's "spamspersecond"
939 feature, and if they do not, it will log an error message.
940 - Added a GetHardwareType() method to the
941 NetworkInterfaceInfo class. This method returns a
942 NETWORK_INTERFACE_HARDWARE_TYPE_* value indicating what
943 kind of network interface it is (e.g. Ethernet, WiFi, etc)
944 - Added a GetNetworkHardwareTypeString() static method to
945 the NetworkInterfaceInfo class. This returns a human-readable
946 string describing the given NETWORK_INTERFACE_HARDWARE_TYPE_*
947 - Added some MacOS/X-specific utility methods to the String class:
948 SetFromCFStringRef(), ToCFStringRef(), and a String constructor
949 method that takes a (const CFStringRef &)
950 - The ip_address and IPAddressAndPort classes now implement
951 the PseudoFlattenable interface to allow for easier handling.
952 o Renamed the ip_address type to IPAddress, and made it a real
953 class (and not a typedef'd alias for uint32) even when
954 MUSCLE_AVOID_IPV6 is defined. ip_address is now a typedef'd
955 alias to IPAddress, for backwards compatibility with old code.
956 o The various convenience methods that could be called on an
957 ip_address object (e.g. IsAddressIPv4(), IsAddressValid(),
958 IsAddressMulticast(), etc) are now methods in IPAddress instead.
959 o AtomicCounter now uses std::atomic<int32> internally,
960 if MUSCLE_USE_CPLUSPLUS11 is defined.
961 o PODSwapper and SwapContentsSwapper now check for the
962 corner-case where the two objects passed in are actually
963 the same object (and if so, they don't attempt a swap)
964 o Added a GetSourceOfLastReadPacket() method to the DataIO interface.
965 o UDPSocketDataIO::GetSourceOfLastReadPacket() is now virtual.
966 o Moved the ip_address/IPAddress and IPAddressAndPort classes'
967 declarations out of NetworkUtilityFunctions.h and into IPAddress.h
968 o Moved the NetworkInterfaceInfo class (and its associated
969 functions) out of NetworkUtilityFunctions.h and into
970 NetworkInterfaceInfo.h
971 * Fixed several places in the codebase that were inappropriately
972 relying on CFStringGetCStringPtr() to return a non-NULL value,
973 when in fact it is documented to return NULL sometimes.
974 * hexterm now exits gracefully when stdin is closed.
975
976 6.42 Released 5/12/2017
977 - Added SetPerProcessRunTime64Offset() and
978 GetPerProcessRunTime64Offset() calls, to support
979 adding an artificial constant to the values returned
980 by GetRunTime64(), for testing purposes
981 - Added ParseHumanReadableSignedTimeIntervalString()
982 and GetHumanReadableSignedTimeIntervalString() functions
983 to TimeUtilityFunctions.h for better parsing of
984 time-intervals that might be negative.
985 - Added some new convenience methods to the Hashtable
986 class: GetKeyAtWithDefault(), GetValueAt(), and
987 GetValueAtWithDefault()
988 o Modified the signatures of a few API calls (including
989 MessageIOGateway::UnflattenHeaderAndMessage(),
990 DeflateByteBuffer(), InflateByteBuffer, and the
991 RawDataQueryFilter class) to take a
992 (const ConstByteBufferRef &) rather than a
993 (const ByteBufferRef &), as they don't ever need to
994 modify the referenced ByteBuffer object anyway.
995
996 6.41 Released 3/23/2017
997 - Added ReadAndDeflateAndWrite() and ReadAndInflateAndWrite()
998 functions to the ZLibUtilityFunctions.{cpp,h} API, and
999 to the ZLibCodec class, to more easily support inflation/
1000 deflation of large files without having to load all their
1001 data into RAM at once.
1002 - Added Visual Studio 2017 RTM project files, as provided by
1003 Mika Lindqvist.
1004 - FileDataIO::GetReadSelectSocket() and GetWriteSelectSocket()
1005 now return valid ConstSocketRef objects on OS's that do
1006 support select-ing on a file's file descriptor (read:
1007 under POSIX-y OS's, but not under Windows)
1008 - hexterm now supports a file=filename argument, in case
1009 you want hexterm to read its input bytes from a file.
1010 * Fixed a number of Doxygen-commenting oversights detected by
1011 Alvaro Lopez Ortega's "doxy-coverage" comment-checking tool.
1012 * Tweaked some of the serialization/deserialization code to be
1013 more careful about avoiding non-aligned word accesses.
1014 o Changed the "OUT OF MEMORY" error message produced by
1015 WARN_OUT_OF_MEMORY macro to read "MEMORY ALLOCATION FAILURE"
1016 instead (since these errors can be caused by a corrupted
1017 heap as well as by actual memory exhaustion)
1018
1019 6.40 Released 2/10/2017
1020 - Added templates constructors to the Ref<> and ConstRef<>
1021 classes so that it is now possible to do implicit
1022 upcasting when creating or assigning a Ref or ConstRef
1023 object (e.g. DataIORef x = TCPSocketDataIORef(y))
1024 - Added DECLARE_REFTYPES macros to the declarations of all
1025 classes that are subclasses of RefCountable, for convenience.
1026 - Integrated Mika Lindqvist's patch to qt_muscled.pro so
1027 that qt_muscled now includes the necessary zlib files
1028 under Windows.
1029 o Removed explicit Ref-type-casting code from a number of
1030 locations where it is no longer necessary.
1031
1032 6.38 Released 1/11/2017
1033 - Added an Atoxll() function; it is the same as Atoull()
1034 except that it parses hexadecimal strings into uint64s
1035 rather than decimal strings.
1036 - hexterm now allows you to optionally specify a local port
1037 number to bind an otherwise transmit-only udp session to
1038 (e.g. "./hexterm udp=127.0.0.1:5555_6666" would send to
1039 port 5555 but listen for incoming packets on port 6666)
1040 * Fixed a bug in MessageField::IsEqualTo() that could cause
1041 two Message objects to be considered equivalent to each
1042 other when in fact they are different.
1043
1044 6.37 Released 10/12/2016
1045 o Added an AUTOCHOOSE_LEGACY_PRIMITIVE_KEY_TYPE_HACK for
1046 (DataNode *) so that the code will again compile on old
1047 (3.x) versions of g++ that don't support SFINAE properly.
1048 - HandleStandardDaemonArgs() now prints out a list of network
1049 interface information if the command line argument
1050 "printnetworkinterfaces" is supplied by the user.
1051 - ParseHexBytes() (and therefore any programs that depend on it,
1052 such as hexterm) now understands C-style escaped-control-char
1053 conventions, e.g. \r means carriage-return, \n means newline.
1054 * Added a work-around for Windows' GetAdaptersAddresses() info
1055 returning 255.255.255.255 as the broadcast address for an
1056 IPv4 interface. GetNetworkInterfaceInfos() will now detect
1057 when this happens and replace that address with the direct
1058 broadcast address for the subnet (e.g. 192.168.0.255) instead.
1059
1060 6.36 Released 6/24/2016
1061 - The NetworkInterfaceInfo class now has a GetMACAddress()
1062 method that will return the 48-bit MAC address associated
1063 with the interface.
1064 - udpproxy will now join a UDP socket to its multicast group
1065 if the provided IP address is a multicast IP address.
1066 - Added a new function Crash() which does just what it says.
1067 The MCRASH macro now calls Crash() after it prints a
1068 stack trace.
1069 o The POSIX implementation of PrintStackTrace() now calls
1070 backtrace_symbols_fd() rather than backtrace_symbols(), to
1071 avoid having to allocate memory when the heap might be corrupted.
1072
1073 6.35 Released 5/25/2016
1074 o Revised MessageIOGateway::DoInputImplementation() so that if
1075 a subclass's override of UnflattenHeaderAndMessage() has retained
1076 a reference to its scratch-input-buffer, DoInputImplementation()
1077 will recognize that and refrain from trying to reuse that buffer
1078 as a place to store subsequent incoming Message data.
1079 - Added Visual Studio 15 project files (Intel and ARM versions),
1080 as provided by Mika Lindqvist.
1081 * Fixed the MuscleQThreadSocketNotifier constructor so that it
1082 will compile in conjunction with Qt 4.x.
1083 * Merged in some ARM compatibility tweaks from Mika Lindqvist.
1084 * Suppressed some MSVC type-conversion warnings in SetupSystem.cpp
1085
1086 6.34 Released 3/14/2016
1087 - Added GetQThread() accessor methods to the Thread class. These
1088 methods are only available when MUSCLE_USE_QT_THREADS is defined.
1089 - Added support for a new preprocessor flag,
1090 MUSCLE_ENABLE_QTHREAD_EVENT_LOOP_INTEGRATION. When this flag
1091 is defined, the Thread::InternalThreadEntry() will use
1092 QThread::exec() as its event loop rather than a simple
1093 while(WaitForNextMessageFromOwner()) loop. This allows for
1094 better integration with QObjects living inside the thread.
1095 - Modified the ThreadedInternalSession class in the
1096 qt_advanced_example to use a QTimer for its periodic messages
1097 when MUSCLE_ENABLE_QTHREAD_EVENT_LOOP_INTEGRATION is defined,
1098 rather than calling WaitForNextMessageFromOwner(), just as an
1099 example of what can be done with better Qt integration.
1100 o Replaced the Thread class's writable GetInternalSocketSet()
1101 method with a more user-friendly API, including new methods
1102 RegisterInternalThreadSocket(), UnregisterInternalThreadSocket(),
1103 UnregisterAllInternalThreadSockets(), and IsInternalThreadSocketReady().
1104 o Replaced the Thread class's writable GetOwnerSocketSet()
1105 method with a more user-friendly API, including new methods
1106 RegisterOwnerThreadSocket(), UnregisterOwnerThreadSocket(),
1107 UnregisterAllOwnerThreadSockets(), and IsOwnerThreadSocketReady().
1108 * Fixed a potential stack overflow in PlainTextMessageIOGateway::
1109 DoOutputImplementation().
1110 * Removed some unnecessary "#include <pthread.h>" directives from
1111 the qt_advanced_example cpp files that were causing the example
1112 program not to build under Windows.
1113 * Added an #ifdef around IPAddressAndPort::WithInterfaceIndex()
1114 so that code will again compile if MUSCLE_AVOID_IPV6 is defined.
1115
1116 6.33 Released 2/25/2016
1117 - When MUSCLE_USE_CPLUSPLUS11 is defined, the Queue class
1118 no longer bothers resetting values in its internal array
1119 to their default state, if ItemType is a trivial type.
1120 - When MUSCLE_USE_CPLUSPLUS11 is defined, the Hashtable class
1121 no longer bothers resetting values in its internal array
1122 to their default state, if their type (KeyType or ValueType)
1123 is a trivial type.
1124 - When MUSCLE_USE_CPLUSPLUS11 is defined, the SanitySetupSystem
1125 class constructor now does some basic sanity checks on the
1126 std::is_trivial() method to make sure it is working as expected.
1127 - hexterm now prints time-since-previous-received-data whenever
1128 it prints incoming data, for easier performance checking.
1129 - Added GetBuildFlags(), PrintBuildFlags() and LogBuildFlags()
1130 functions to SystemInfo.h so that it's easy for a MUSCLE-based
1131 executable to report the preprocessor flags it was built with.
1132 This can be handy for debugging purposes.
1133 - muscled now reports its build-flags at startup, if is launched
1134 with log level "debug" or higher (e.g. "displaylevel=debug").
1135 - Added a WithInterfaceIndex() convenience method to the
1136 IPAddressAndPort class.
1137 - Usage of the DetectNetworkConfigChangesSession class has
1138 been simplified. In particular, it is no longer necessary
1139 to subclass this class in order to use it; instead you can
1140 now just have any of your existing session or factory subclasses
1141 implement the new INetworkConfigChangesTarget interface, and
1142 the DetectNetworkConfigChangesSession will call their
1143 INetworkConfigChangesTarget methods when appropriate.
1144 - The Windows-only "console" command line argument now can take
1145 an optional value; e.g. console=foo.txt will cause the program's
1146 stdout and stderr output to be redirected to file foo.txt.
1147 - The Win32AllocateStdioConsole() function now takes an optional
1148 argument, as described above.
1149 - hexterm now looks for a "nojoin" command line argument when a
1150 multicast group is specified; if found, it will deliberately
1151 not join the multicast group (and become a send-only UDP session)
1152 o DetectNetworkConfigChangesSession::SetEnabled(false) now also
1153 suppresses calls to ComputerIsAboutSleep() and ComputerJustWokeUp().
1154 o The DECLARE_REFTYPES macro now specifies the muscle namespace
1155 explicitly, to make it easier to use from other namespaces.
1156 * Fixed an underflow bug in LogHexBytes() and friends that would
1157 cause 4 billion dashes to be printed if the title text was
1158 too long.
1159 * hexterm.vcproj now includes the necessary shlwapi.lib dependency
1160
1161 6.32 Released 12/3/2015
1162 - Added support for a new compiler flag,
1163 -DMUSCLE_RECORD_REFCOUNTABLE_ALLOCATION_LOCATIONS,
1164 that makes it easier to track down the cause of
1165 RefCountable objects not getting freed properly on
1166 process exit. See BUILDOPTIONS.TXT for details.
1167 * Tweaked SetupSystem.cpp so that using it no longer
1168 requires MiscUtilityFunctions.cpp to be compiled also.
1169 * The _childProcessCrashed flag is now reset by
1170 WaitForChildProcessToExit() only when there is a child
1171 process handle available to wait on. That way multiple
1172 calls to WaitForChildProcessToExit() won't obliterate
1173 the child-process-crashed information.
1174 * Under Windows, the default handled-signals set now
1175 also includes CTRL_C_EVENT and CTRL_BREAK_EVENT, so
1176 that when running "muscled.exe catchsignals", these
1177 keystrokes can also be used to cleanly shut down the
1178 muscled process.
1179
1180 6.31 Released 8/27/2015
1181 - The ChildProcessDataIO class now has a DidChildProcessCrash()
1182 method that will return true iff WaitForChildProcessToExit()
1183 detected that the child process exited due to an unhandled
1184 signal rather than via a normal process termination.
1185 * In v6.30, the windows implementation of ChildProcessDataIO
1186 would always hide the child process's windows, even in cases
1187 where it was desirable for the child process's windows to be
1188 visible. To avoid that misbehavior, the child process's windows
1189 are now hidden only if the CHILD_PROCESS_LAUNCH_BIT_WIN32_HIDE_GUI
1190 bit is set in the (launchBits) argument.
1191 * Some of the the Doxygen comments for enumerations in the
1192 header files were not formed correctly, so the Doxygen
1193 HTML pages would leave them undocumented. Fixed.
1194 * Fixed a compiler warning in MessageField::IsEqualTo().
1195
1196 6.30 Released 8/11/2015
1197 - The Message class now uses special-case variant logic for fields
1198 that contain only a single value, so that in the common case
1199 the allocation of an AbstractDataArray object is avoided.
1200 - Added a convenience overload of GetMessageFromPool() that
1201 takes a ByteBufferRef as its argument.
1202 * Merged in Mika's patch to fix the _sntprintf_s() calls in
1203 the Windows implementation of SysLog.cpp.
1204 * DetectNetworkConfigChanges.cpp would fail to compile under Windows
1205 under some circumstances, due to unicode-string handling issues.
1206 Fixed.
1207 * Added spaces to *_FORMAT_SPEC tokens in dataio/RS232DataIO.cpp
1208 * Added missing namespace qualifiers to MCRASH() macro, so that it
1209 can be called from another namespace.
1210 * Fixed a bug in the Hashtable class that could cause crashes
1211 after a call to EnsureSize(0, true).
1212 * Message::Unflatten() now resizes the Message's entries-Hashtable
1213 to be the exact size of the number of entries it will contain.
1214 * Added some #includes to the gz*.c zlib files so "implicit
1215 function declaration" warnings are no longer emitted when
1216 compiling under MacOS/X.
1217 * Fixed a static-initialization-ordering bug in the ObjectCounterBase
1218 class that could cause it to try and lock an invalid Mutex during
1219 process startup or shutdown.
1220 * Under Windows, use of the ChildProcessDataIO class could cause
1221 an empty Console window to appear. That no longer happens.
1222
1223 6.23 Released 7/7/2015
1224 - The StringMatcher class now has a IsPatternListOfUniqueValues()
1225 method that returns true iff the held pattern is a comma-separated
1226 list of non-wildcarded values.
1227 o NodePathMatcher::DoTraversalAux() was using a Queue as a cache,
1228 which could be inefficient due to O(N^2) lookups in certain cases.
1229 Replaced it with a Hashtable for better performance.
1230 o Optimized the NodePathMatcher algorithm to be more efficient
1231 with node-paths that include clauses that are long lists of
1232 comma-separated node names.
1233 * SharedFilterSessionFactory.cpp wouldn't compile if -DMUSCLE_AVOID_IPV6
1234 was specified on the compile line. Fixed.
1235
1236 6.22 Released 6/11/2015
1237 - Added an IsWaitingForEvents() method to ReflectServer class,
1238 so that a (user-supplied) watchdog thread can observe when the
1239 ReflectServer is blocked waiting for I/O vs when it is doing
1240 something.
1241 - Added Mika's vc++14 subdirectory, which contains Visual C++
1242 project files for Visual Studio 2015.
1243 - DataNode::GetAncestorNode() now takes an optional second argument
1244 that tells it what to return if the ancestor node isn't found.
1245 o Added some more Cygwin/MinGW compatibility changes contributed
1246 by Mika Lindqvist.
1247 o Rewrote some of the node-traversal callback methods so that they
1248 no longer pass an integer argument by casting it to (void *).
1249 * Tweaked various files to fix warnings reported by cppcheck 1.69.
1250 * The stdout-display in qt_muscled wasn't read-only. Fixed.
1251
1252 6.21 Released 5/14/2015
1253 o Merged in Mika Lindqvist's patch to make the StackWalker code
1254 use less stack space.
1255 o Merged in Mika Lindqvist's patches for better Cygwin compatibility.
1256 * Made the StackWalker code a bit more robust.
1257 * Merged in Mika Lindqvist's patch to the VC++12 projects
1258 to link debug builds against the MultiThreadedDebug
1259 run time library rather than the MultiThreaded library.
1260 * Fixed a couple of const-correctness issues in the StackWalker code.
1261 o Modified the Windows implementation of GetNetworkInterfaceInfos()
1262 to not specify an interface index for IPv6 network device address
1263 ::1, as doing so causes UDP-packet-routing problems under Windows 7.
1264
1265 6.20 Released 4/20/2015
1266 - Added a new sub-folder besupport/admin_gui. It contains
1267 Fredrik Modéen's GUI shell for more easily running muscled
1268 under BeOS or Haiku.
1269 - Added new MUSCLE-specific versions of some potentially-insecure
1270 (per Microsoft) C functions to MuscleSupport.h: muscleFopen(),
1271 muscleStrcpy(), muscleStrncpy(), muscleSprintf(), and
1272 muscleSnprintf(). These get expanded out to the appropriate
1273 system-specific equivalent, so that e.g. under Windows we can
1274 use the CRT-secure Windows-only equivalents, while not having
1275 to put #ifdefs all over the code to keep it compiling elsewhere.
1276 - Added Visual C++ 2013 project files, courtesy of Mika Lindqvist
1277 (in the new "vc++12" subfolder)
1278 o Renamed the vc++ subfolder to vc++8 to make it more obvious
1279 that the project files it contains are for Visual Studio 2008.
1280 o MUSCLE classes that should not be subclasses are now tagged
1281 with the MUSCLE_FINAL_CLASS keyword so that when compiled
1282 with -DMUSCLE_USE_CPLUSPLUS11 the compiler will produce a
1283 compile-time error if they are subclassed.
1284 o Modified the QueueGatewayMessageReceiver and StringMatcherQueue
1285 classes to no longer subclass from the Queue class, since
1286 subclassing from Queue is no longer allowed. Instead, they
1287 now include a Queue object as a member variable and provide
1288 accessors to that object.
1289 o Modified the ObjectPool class to no longer subclass the
1290 ObjectNode internal class from the templated-type, since
1291 the templated-type might now be marked as "final".
1292 o Replaced various of the aforementioned calls with their
1293 muscle*() equivalents in the codebase.
1294 o Merged in some patches contributed by Mika Linqvist to avoid
1295 CRT security warnings when compiling under MSVC 2013.
1296 o Removed all calls to strcat() and strncat(), as their string
1297 truncation semantics are too difficult for me to reason about
1298 reliably. The rewritten code is also generally more efficient.
1299 o Modified DefaultFileLogger::CloseLogFile() to reduce its
1300 stack usage.
1301 o Modified GetNetworkInterfaceInfos() to not specify an interface
1302 index for IPv6 network device address ::1, as doing so causes
1303 UDP-packet-routing problems under MacOS/X.
1304 * Fixed a const-correctness problem in ConvertMessages.cpp.
1305 * Removed a compiler warning (from SysLog.cpp) about
1306 GetVersionA() not working usefully under Windows 8 and higher.
1307 * Applied Mika Lindqvist's patch to fix some potential
1308 memory leaks in regcomp.c
1309 * Applied Mika Lindqvist's patch to make the Windows
1310 "StackWalker" stack-trace-generation routine Unicode-compliant.
1311
1312 6.12 Released 4/6/2015
1313 - The Python message_transceiver_thread class will now
1314 fall back to connecting via IPv4 if the supplied hostname
1315 cannot be expanded to an IPv6 address (and vice versa).
1316 o Added a NotCopyable base class to various classes
1317 (Socket, DataNode, AbstractReflectSession, etc) so that
1318 the compiler will verify that they are not being copied.
1319 o The StringMatcher class now interprets any simple wildcard
1320 string starting with a backtick character (`) as indicating
1321 a non-simple regex string. That way it is possible to use
1322 the standard regex functionality, if desired, in contexts
1323 that otherwise provide no way to indicate that a string
1324 is meant to be a full regex string and not a simple wildcard
1325 string (e.g. in MUSCLE subscription strings)
1326 o Tweaked the codebase to get rid of a number of style
1327 problems and minor errors that were reported by cppcheck.
1328 * Added a patch to the captive regex library to fix a
1329 potential int32-overrun in regcomp(). Thanks to Mika
1330 Lindqvist for supplying me with the patch.
1331 * Merged in some patches from Mika Lindqvist to avoid
1332 some warnings when compiling in a 64-bit environment.
1333
1334 6.11 Released 2/2/2015
1335 - When compiled under Windows, SetupSystem.cpp now contains
1336 #pragma commands so that necessary Windows-libraries will
1337 be automatically linked in. This means the user no longer
1338 has to spend time chasing down so many linker errors when
1339 setting up a new project file.
1340 o MutexGuard's argument is now a const reference, since
1341 Mutex::Lock() and Mutex::Unlock() are const methods.
1342 o Removed AbstractReflectSession::GetDefaultHostName()
1343 and replaced it with a new method named
1344 AbstractReflectSession::GenerateHostName(). The new
1345 method lets the session subclass choose a custom
1346 hostname for the session even if the IP address
1347 determination didn't fail.
1348 o Added some private/unimplemented method overloads for
1349 MessageTransceiverThread::AddNewConnectSession() and
1350 QMessageTransceiverHandler::SetupAsNewConnectSession()
1351 so that if the caller tries to call these methods
1352 with timeout-values but forgets to include the
1353 (expandLocalhost) argument, the error will be caught
1354 at compile-time rather than causing unexpected run-time
1355 behavior.
1356
1357 6.10 Released 12/12/2014
1358 - The DetectNetworkConfigChangesSession class now has
1359 ComputerIsAboutToSleep() and ComputerJustWokeUp()
1360 callback methods that are called at the times indicated
1361 by their names. Currently this functionality is
1362 implemented only under MacOS/X and Windows.
1363 o Added work-arounds for gcc-3.x SFINAE incompatibilities
1364 to MuscleSupport.h
1365 o Updated the muscle.dox file using doxygen -u so that
1366 it is now up-to-date (as of Doxygen 1.8.8)
1367 * If a string like "for 10 seconds" was passed to
1368 ParseHumanReadableTimeIntervalString(), the "for"
1369 prefix would cause the returned value to be twice
1370 what it was expected to be. Fixed.
1371
1372 6.09 Released 11/3/2014
1373 - Added a (preferIPv6) argument to GetHostByName(). If
1374 left as true (the default value), GetHostByName() will
1375 prefer to return an IPv6 address over an IPv4 address.
1376 - Added support for a DEBUG_LARGE_MEMORY_ALLOCATIONS_THRESHOLD
1377 compiler-flag into GlobalMemoryAllocator.cpp. When this
1378 flag is set to a value (in bytes), any memory allocations
1379 greater than the value will result in a message and a stack
1380 trace being printed to stdout.
1381 - When MUSCLE_USE_CPLUSPLUS11 is defined, the PODHashFunctor
1382 class will provoke a compile-time error if the program tries to
1383 use a struct or class as a KeyType in a Hashtable and the
1384 struct/class does not have a "uint32 HashCode const" method
1385 defined. (Previously the code would compile without error, and
1386 then hashing errors would occur at runtime due to the object's
1387 padding bytes being uninitialized)
1388 * The MCRASH() macro now calls abort() rather than assert(false),
1389 so that a crash will actually occur, even if the code was
1390 compiled with -DNDEBUG.
1391 o The Windows implementation of MCRASH() now calls RaiseException(),
1392 so that the crash will behave more like an actual caused-by-a-bug
1393 crash (in particular, a Windows Structured Exception will be raised)
1394 o Updated SendDataUDP() to work around a "feature" in OS/X 10.10 (aka
1395 Yosemite) that causes setsockopt(fd, IPPROTO_IPV6, IPV6_MULTICAST_IF)
1396 to fail when setting the socket's interface-index value back to 0.
1397
1398 6.08 Released 10/10/2014
1399 - Added a ShrinkToFit() convenience method to the Queue,
1400 Hashtable, and String classes. This method shrinks the
1401 object so that the amount of memory it has allocated internally
1402 matches the size of the data it is actually holding.
1403 - Hashtable::EnsureSize() and Queue::EnsureSize() now take an optional
1404 (allowShrink) argument, that (if set to true) allows the object's
1405 internally-allocated array to be reallocated smaller if it is larger
1406 than necessary.
1407 o Tweaked the buffer-expansion behavior of the String class to
1408 be a bit more efficient.
1409 * Added a guard against a potential infinite recursion that
1410 could occur while logging an "OUT OF MEMORY" error after
1411 a memory allocation failure, if a LogCallback tried to
1412 allocate memory.
1413
1414 6.07 Released 9/18/2014
1415 - Added a GlobalPrintRecyclersToStream() method to the
1416 AbstractObjectRecycler class, for better debugging and
1417 analysis of the ObjectPool's memory usage.
1418 - Added an abstract PrintToStream() method to the
1419 AbstactObjectRecycler class, and a concrete implementation
1420 of that method to the ObjectPool and ThreadPool classes.
1421 - Added a testobjectpool.cpp test program to the tests
1422 folder, as a quick sanity check for the ObjectPool class.
1423 - Java performance improvement from Bryan Varner: Switched to a
1424 direct byte buffer, which is allocated by the OS outside of
1425 the GC's managed space.
1426 - Java performance improvement from Bryan Varner: Scoped the
1427 receiving byte buffer to the receiver, which cut down on a
1428 lot of time spent allocating short-lived buffers.
1429 - Java performance improvement from Bryan Varner: Added a
1430 constructor for the MessageReceiver to allocate it's buffer
1431 to the same size as the sockets underlying buffer and made
1432 use of the call where possible.
1433 - Added a GetObjectClassName() method to the ObjectPool class.
1434 - The GetNetworkInterfaceInfos() function now supports a new
1435 bit named GNII_INCLUDE_UNADDRESSED_INTERFACES, which tells
1436 it to return even network interfaces with no IP address.
1437 - The default value of the (includeBits) argument to
1438 GetNetworkInterfaceInfos() is now GNII_INCLUDE_ALL_ADDRESSED_INTERFACES
1439 rather than GNII_INCLUDE_ALL_INTERFACES, to reflect the nuance
1440 that was added above; the default behavior is unchanged, though.
1441 - When -DMUSCLE_USE_CPLUSPLUS11 is defined, muscleMin() and
1442 muscleMax() now use variadic templates so that they can
1443 accept any number of arguments (rather than just up to five).
1444 o Java fix from Bryan Varner: Updated the handling code for
1445 NotEnoughDataExceptions to no longer rely on the position of
1446 the buffer (but rather look at the buffer limit, or the amount
1447 previously read into the buffer) -- which basically makes the
1448 above change unnecessary, but I'm paranoid.
1449 o Changed the Message, Queue, Hashtable, and String classes so
1450 that when they are set equal to an empty/default object, they
1451 now free any large dynamically-allocated buffer they may be holding.
1452 This avoids excessive memory usage by objects that have been
1453 returned to an ObjectPool after being used to hold large amounts
1454 of data.
1455 o Modified muscleMin(), muscleMax(), muscleSgn(), muscleClamp(),
1456 and musclAbs() to take arguments and return by value rather
1457 than by const-reference.
1458 * Java fix from Bryan Varner: Fixed a bug causing communication
1459 failures in the NIO message unflattening.
1460 * Java fix from Bryan Varner: Prior to throwing a
1461 NotEnoughDataException the position of the buffer wasn't
1462 being updated in MessageIOGateway and JZLibMessageIOGateway.
1463
1464 6.06 Released 8/15/2014
1465 - ParseHumanReadableTimeIntervalString() can now parse strings
1466 where only the time-unit is specified. (e.g. "second" now
1467 returns 1000000)
1468 - Added GetInternalThreadPulseTime(), InternalThreadPulse(),
1469 WriteToMainThread(), and ShutdownInternalThread() methods
1470 to the AsyncDataIO class, so that it can be subclassed for
1471 use in impersonating a "live" socket, using test data
1472 internally generated inside its I/O thread.
1473 o Added code to testbytebuffer.cpp, so that if a filename is
1474 passed as an argument, the contents of the specified file
1475 will be printed to stdout in annotated-hex format.
1476 o Added support for a -DMUSCLE_AVOID_XENOMAI flag, to be used
1477 when compiling with -DTARGET_PLATFORM_XENOMAI but we don't
1478 want MUSCLE to use Xenomai anyway.
1479 * Merged in Augustin Cavalier's patch to get MUSCLE to
1480 compile again under Haiku.
1481 * Modified the Queue code to avoid a static-analyizer warning.
1482 * Fixed a valgrind hit in AbstractReflectSession::Reconnect().
1483 * Fixed a bug in AsyncDataIO that would cause it to hang
1484 when being shut down.
1485 * Fixed a bug that could cause a QueryFilter's replacement
1486 ConstMessageRef object to be ignored in certain circumstances.
1487
1488 6.05 Released 6/27/2014
1489 - Upgraded the captive zlib implementation to v1.2.8.
1490 o Moved public repository from FreeCode to GitHub, because
1491 FreeCode no longer accepts release announcements.
1492 o Renamed LICENSE.txt to LICENSE, since that's how GitHub
1493 likes the license file to be named.
1494 * Merged in Mika Lindqvist's patch to avoid some truncation
1495 warnings for strlen() calls under 64-bit Visual C++.
1496
1497 6.04 Released 6/11/2014
1498 - Added a public GetParametersConst() method to the
1499 StorageReflectSession, for easier debugging.
1500 * Fixed a bug that prevented the PR_COMMAND_REMOVEPARAMETERS
1501 handler from removing parameters that had escaped wildcard
1502 characters in their names.
1503
1504 6.03 Released 6/2/2014
1505 - Added a convenience method muscleArrayIndexIsValid() that
1506 returns true iff the specified numeric index is a valid index
1507 into the specified array.
1508 - Added a CloseCurrentLogFile() function that can be used to
1509 force the file-logger to close any log file that it currently
1510 has open.
1511 - Added a SetSendDestinations() method to the UDPSocketDataIO
1512 class, for convenience.
1513 - The Launch*() and System*() methods in the ChildProcessDataIO
1514 class now take an optional directory-path argument so that you
1515 can specify the current working directory of the child process.
1516 - Added move-constructors and move-assignment operators to the
1517 Ref and ConstRef classes (available only when
1518 MUSCLE_USE_CPLUSPLUS11 is defined, of course).
1519 - Added a Reset() method to the PointerAndBool class.
1520 - Added a SwapContents() method to the PointerAndBool class.
1521 - Added RemoveHeadMulti() and RemoveTailMulti() convenience
1522 methods to the Queue class.
1523 o Queue::GetArrayPointer() now makes sure to set (retLength)
1524 to 0 when it returns NULL.
1525 * Under Windows, GetConstSocketRefFromPool() now automatically
1526 sets the don't-inherit flag on any sockets passed to it. This
1527 avoids problems caused by child processes unintentionally holding
1528 sockets connections open in the parent process.
1529 * Fixed a bug in Queue::EnsureSizeAux() that would cause a
1530 bogus extra item to be added to the end of the Queue if the
1531 (setNumItems) argument was set to true.
1532 * The MacOS/X implementation of DetectNetworkConfigChangesSession
1533 would fail to notify its calling code about a changed network
1534 configuration if the network change did not include any
1535 IP address changes. Now it does provide a notification
1536 for that scenario as well.
1537
1538 6.02 Released 4/2/2014
1539 - Added optional (addHeaderBytes) and (addFooterBytes) arguments
1540 to the DeflateByteBuffer() utility functions.
1541 - Added an implementation of GetByteBufferFromPool() that takes
1542 a DataIO as an argument, for easy reading in of files, etc.
1543 - Added a NybbleizeData() implementation that takes a pointer
1544 and length argument rather than a ByteBuffer object.
1545 - Added an AreKeySetsEqual() convenience method to the Hashtable
1546 class. This method checks for equal key-sets while ignoring
1547 the values in the two Hashtables.
1548 - Added WithoutPrefixIgnoreCase() and WithoutSuffixIgnoreCase()
1549 convenience methods to the String class.
1550 - Added some missing convenience overloads for HexBytesToString().
1551 - CanWildcardStringMatchMultipleValues() now ignores dashes in the
1552 string, since they only have meaning when enclosed in brackets --
1553 and if there are brackets in the string, those will be sufficient
1554 to cause CanWildcardStringMatchMultipleValues() to return true.
1555 o Renamed CanRegexStringMatchMultipleValues() to
1556 CanWildcardStringMatchMultipleValues(), as it is really examining
1557 the simplified wild-card syntax and not the official regex
1558 syntax.
1559 o Several locations that were calling HasRegexTokens() to decide
1560 if it was worth doing pattern-matching with a key-string now
1561 call CanWildcardStringMatchMultipleValues() instead.
1562 o DataNode::Reset() now deletes any metadata structures the
1563 DataNode may have accumulated, rather than simply clearing them.
1564 This saves RAM, and also ensures that recycled DataNodes will
1565 act exactly the same as newly created ones.
1566 * The MemMem() function did not return correct results in all
1567 cases. Rewrote it to work correctly.
1568
1569 6.01 Released 1/7/2014
1570 - Added a PrependWord() convenience method to the String class.
1571 - Added WithReplacements() convenience methods to the String class.
1572 - Added a SetExplicitDelayMicros() method to the
1573 DetectNetworkConfigChangesSession class.
1574 - Added a IsCopperDetected() method to the NetworkInterfaceInfo
1575 class, so that code can tell whether or not a Ethernet jack
1576 has a cable plugged in to it.
1577 - Added a "quietsend" argument to hexterm.
1578 o The NetworkInterfacesChanged() virtual method
1579 in the DetectNetworkConfigChangesSession class
1580 has been changed to take an argument that calls out
1581 which network interfaces in particular have changed.
1582 This functionality is currently only implemented under
1583 Linux, MacOS/X and Windows. For other OS's the
1584 argument will always be an empty list.
1585 * Fixed a bug in the Linux implementation of
1586 DetectNetworkConfigChangesSession that could cause
1587 a segmentation fault if recvmsg() returned an error
1588 (e.g. due to a signal being received).
1589
1590 6.00 Released 10/14/2013
1591 - Rewrote the SSLSocketDataIO class to work better
1592 with non-blocking I/O (in conjunction with the
1593 new SSLSocketAdapterGateway class).
1594 - Added implementations of SSLSocketDataIO::SetPrivateKey()
1595 and SSLSocketDataIO::SetCertificate() that take a
1596 ByteBuffer as an argument.
1597 - Added an SSLSocketAdapterGateway class that is used
1598 to manage OpenSSL's internal state machine when using
1599 an SSLSocketDataIO class with your gateway.
1600 - Added SetSSLPrivateKey() and GetSSLPrivateKey() methods
1601 to the ReflectServer class, for easier enabling of SSL
1602 authentication on all incoming TCP connections. These
1603 methods are available iff MUSCLE_ENABLE_SSL is defined.
1604 - Added SetSSLPublicKeyCertificate() and GetSSLPublicKeyCertificate()
1605 methods to the ReflectServer class, for easier enabling
1606 of SSL authentication on outgoing TCP connections. These
1607 methods are available iff MUSCLE_ENABLE_SSL is defined.
1608 - Added SetSSLPrivateKey() and SetSSLPublicKeyCertificate()
1609 methods to the MessageTransceiverThread class, for easier
1610 enabling of SSL functionality when using threaded I/O.
1611 - Added an ssl_data folder with some info on generating
1612 OpenSSL public/private keypairs, and an example keypair
1613 for use in testing OpenSSL.
1614 - When MUSCLE_ENABLE_SSL is defined, muscled now accepts
1615 an optional 'privatekey=filename' argument. When specified,
1616 SSL mode will be enabled and muscled will only accept incoming
1617 TCP connections that present public keys that match this
1618 private key/certificate.
1619 - When MUSCLE_ENABLE_SSL is defined, portablereflectclient
1620 and qt_example will now accept an optional
1621 'publickey=filename' argument. When specified, SSL mode
1622 will be enabled and these clients will connect to muscled
1623 using OpenSSL and present this file as their credentials.
1624 - Added an "Animate" checkbox to the qt_example demo.
1625 Checking it causes the window to move its indicator around
1626 automatically. This is fun and also useful if you want to
1627 test a scenario where multiple clients are generating traffic
1628 simultaneously.
1629 - Made the qt_example demo prettier.
1630 - Renamed the C++11-helper macros in Hashtable.h and Queue.h
1631 to make them less likely to collide with other packages' macros.
1632 * Fixed some minor errors in the SSLSocketDataIO class.
1633 o Renamed SSLSocketDataIO::SetKey() to SetPrivateKey().
1634 o Renamed SSLSocketDataIO::SetCertificate() to
1635 SetPublicKeyCertificate().
1636 o AbstractMessageIOGateway::SetDataIO() is now a virtual
1637 method.
1638
1639 5.92 Released 9/20/2013
1640 - Improved support for C++11 move-semantics in the
1641 Queue and Hashtable classes (enabled only when
1642 -DMUSCLE_USE_CPLUSPLUS11 is defined)
1643 - Added some instrumentation to the String class so
1644 I can watch how many times a String object is copied, moved,
1645 etc (enabled only when -DMUSCLE_COUNT_STRING_COPY_OPERATIONS
1646 is defined)
1647 - Added a PrintAndClearStringCopyCounts() function which
1648 will print out the String-operation data collected above.
1649 - Added some SFINAE magic to muscleSwap() so that it will
1650 swap by calling SwapContents() when possible, rather than
1651 by copying to a temporary object.
1652 - Added an initializer-list constructor and overload of
1653 AddTailMulti() to the Queue class (available only when
1654 -DMUSCLE_USE_CPLUSPLUS11 is defined, of course)
1655 o Renamed the Queue and array overloads of Queue::AddTail()
1656 to AddTailMulti(), to avoid conflicts with the new C++11
1657 template parsing support.
1658 o Renamed the Queue and array overloads of Queue::AddHead()
1659 to AddHeadMulti(), to avoid conflicts with the new C++11
1660 template parsing support.
1661 o Replaced MCRASH_IMPL macro with a call to assert(false).
1662 * A little more Android-compatibility tweakage.
1663 * Many of the programs in the tests folder weren't compiling
1664 under C++11. Fixed.
1665 * Fixed several potential bugs that were detected by clang's
1666 static analysis tool.
1667
1668 5.91 Released 9/2/2013
1669 - Added EnsureCanPut() convenience method to the Hashtable class.
1670 - Added EnsureCanAdd() convenience method to the Queue class.
1671 o Changed DoMutexAtomicIncrement() to be an inline function to
1672 make calling it more efficient.
1673 * Changed QMessageTransceiverThread and QAcceptSocketsThread to
1674 call QCoreApplication::postEvent() rather than
1675 QApplication::postEvent(), to allow for non-GUI Qt apps.
1676 * Updated the Beginner's Guide document to reflect MUSCLE's
1677 improved UDP support.
1678 * Merged in some Android compatibility changes provided by
1679 Jean-François Mullet.
1680 * Use of the MUSCLE_USE_MUTEXES_FOR_ATOMIC_OPERATIONS compile
1681 flag would cause MUSCLE to crash on startup due to an
1682 order-of-operations issue. This has been fixed now.
1683 * The MUSCLE_USE_MUTEXES_FOR_ATOMIC_OPERATIONS compile flag
1684 was previously only used if no other implementation of
1685 AtomicCounter was available. Now the flag has higher
1686 precedence, so setting the flag means that Mutexes will
1687 be used, even if another (more efficient) mechanism is
1688 available.
1689
1690 5.90 Released 8/6/2013
1691 - Added a GetPacketMaximumSize() method to the DataIO class
1692 to allow gateway code to more intelligently handle UDP-style
1693 packetized communication.
1694 - MessageIOGateway now works usefully in conjunction with
1695 UDPSocketDataIO.
1696 - Added CreateObjectFromArchiveMessage() templated functions
1697 to Message.h, to serve as a restoring-side counterpart to
1698 GetArchiveMessageFromPool(), etc.
1699 - AtomicCounter::AtomicIncrement() now returns a boolean
1700 (true iff the new counter value is equal to one).
1701 - Modified the HashtableIterator class so that read-only
1702 Hashtable iterations are now thread-safe even if the
1703 HTIT_FLAG_NOREGISTER flag isn't specified.
1704 - Added a muscle_thread_id class to SetupSystem.h, to
1705 properly represent a thread ID in an
1706 implementation-neutral fashion.
1707 - Added a "deadlock" program to the tests folder. This
1708 program deliberately risks creating a deadlock, as a way
1709 to exercise/demonstrate the deadlockfinder test.
1710 - Added support for a -DMUSCLE_AVOID_THREAD_SAFE_HASHTABLE_ITERATORS
1711 command line flag, for those who would rather avoid the
1712 overhead of automatic thread safety and promise to supply
1713 HTIT_FLAG_NOREGISTER arguments by hand where necessary.
1714 - Added an optional LRU lookup cache to the GetHostByName()
1715 function, so that it can return more quickly when the same
1716 hostnames are getting resolved over and over again.
1717 - Added a SetHostNameCacheSettings() function that enables
1718 and adjusts the LRU lookup cache in GetHostByName().
1719 - Added support for "dnscache" and "dnscachesize" command
1720 line arguments in HandleStandardDaemonArgs(), to allow
1721 command-line specification of the LRU lookup cache's behavior.
1722 o Modified the Hashtable class so that the _iterHead, _iterTail,
1723 and _freeHead member values are now uint32s rather than
1724 pointers, to reduce memory usage.
1725 o Removed the ThreadLocalStorage::SetFreeHeldObjectsOnExit()
1726 method, and added a boolean argument to its constructor
1727 instead, since pthreads don't allow you to change that
1728 setting after pthread_key_create() has been called.
1729 o Moved GetCurrentThreadID() into the muscle_thread_id class
1730 as a static member function, and changed it to return
1731 a muscle_thread_id object rather than unsigned long.
1732 o Changed the default hostname for sessions without a known
1733 IP address from "<unknown>" to "_unknown_", as the angle
1734 brackets in the former string have a special meaning as of
1735 the 5.84 release, and that could interfere with node-path
1736 matching in unintended ways.
1737 o The CalculateChecksum() methods in Message.cpp have been
1738 modified to be more robust in detecting data transposition
1739 differences.
1740 o Removed the MUSCLE_USE_QT_FOR_ATOMIC_OPERATIONS support
1741 from AtomicCounter.h, since Qt's QAtomicInt class doesn't
1742 support the functionality that the AtomicIncrement()
1743 method's new return value requires.
1744 o Removed MessageIOGateway::FlattenMessage() and
1745 MessageIOGateway::UnflattenMessage(). Added in their
1746 place: MessageIOGateway::FlattenHeaderAndMessage()
1747 and MessageIOGateway::UnflattenHeaderAndMessage().
1748 These new methods deal with both the header bytes and
1749 the Message body at the same time.
1750 o Added a udpproxy.vcproj file to the tests folder, to
1751 help compile udpproxy under Windows.
1752 o Message:Flatten() now iterates over the fields in the
1753 Message once, instead of twice.
1754 o GetCurrentThreadID() is now an inline function, since
1755 it may now get called often by HashtableIterator.
1756 o Modified the deadlockfinder code to use Queues instead
1757 of Hashtables, since muscle_thread_id can't be used
1758 as a Hashtable key type anymore.
1759 * Fixed testudp.cpp to properly use a MessageIOGateway
1760 for its UDP communication.
1761 * Tweaked the ifdefs in FilePathInfo.cpp a bit more so that
1762 statInfo.st_birthtimespec won't be accessed when using
1763 MacOS/X SDKs that don't provide it.
1764 * MessageDataIOGateway no longer tries to Unflatten a
1765 Message from a zlib-deflated data buffer that it was
1766 unable re-inflate.
1767 * Fixed a bug in SendDataUDP() that could cause SendDataUDP()
1768 to incorrectly return an error when sending to a multicast
1769 address using non-blocking mode, and the output buffer was
1770 full.
1771
1772 5.85 Released 7/2/2013
1773 - Added LogTime(MUSCLE_LOG_DEBUG) calls to all the error paths
1774 in MessageIOGateway::DoInputImplementation() and
1775 Message::Unflatten(), so that it's easier to determine when
1776 TCP connections are being aborted due to data corruption.
1777 - Added a PreviousOperationHadTransientFailure() function,
1778 which returns true iff errno is EINTR or ENOBUFS.
1779 - Specifying spamspersecond=-1 will now cause hexterm to
1780 send spam data as fast as possible.
1781 o SocketMultiplexer.h's MUSCLE_USE_POLL implementation was
1782 supplying POLLERR to WSAPoll() but WSAPoll() doesn't support
1783 POLLERR so WSAPoll() would return an error when this occurred.
1784 Worked around the problem by filtering out POLLERR when
1785 compiling under Windows.
1786 * Fixed a bug where send() returning ENOBUFS could cause the
1787 socket connection to be terminated, even though ENOBUFS is
1788 not a fatal condition.
1789 * SocketMultiplexer.cpp would not compile when MUSCLE_USE_POLL
1790 was defined. Fixed.
1791 * The ZLibCodec::Deflate() method would fail to compress all
1792 the data in a very large buffer (e.g. over 42MB). Fixed.
1793
1794 5.84 Released 4/20/2013
1795 - The StringMatcher class's numeric-range syntax has been
1796 extended so that you can now specify multiple ranges.
1797 For example, "<19-21,25,30-50>" would match strings
1798 "19", "20", "21", "25", "30", "31", [...], and "50".
1799 - Added GetCurrentTime64ForRunTime64() and GetRunTime64ForCurrenTime64()
1800 conversion functions to TimeUtilityFunctions.h.
1801 - Added a GetDescendant() utility method to the DataNode class.
1802 - Added C++11 move-constructors and move-assignment-operators
1803 to the Hashtable, Queue, String, Message, and ByteBuffer classes.
1804 For backwards compatibility with older compilers, this code
1805 will only be compiled if -DMUSCLE_USE_CPLUSPLUS11 is specified
1806 on the compile line.
1807 - SharedMemory class will now nerf itself into a non-shared-memory
1808 class if -DMUSCLE_FAKE_SHARED_MEMORY is specified.
1809 - Added a testfilepathinfo test to the tests folder.
1810 o Updated all copyright notice headers to read 2000-2013 Meyer Sound.
1811 * Added spaces between macro tokens (e.g. UINT32_FORMAT_SPEC) and
1812 string constants (e.g. "Hello") to make C++11 compilers happy.
1813 * ByteBuffer.cpp had a syntax error that would prevent it from
1814 compiling on big-endian hosts. Fixed.
1815 * MacOS/X only: Replaced deprecated Carbon function calls with
1816 Mach equivalents, to avoid deprecation warnings under 10.8.x.
1817
1818 5.83 Released 11/11/2012
1819 - Added convenience versions of InflateByteBuffer() and
1820 DeflateByteBuffer() that take a ByteBufferRef as an argument.
1821 o Removed some obsolete/unused methods (EnsureBufferSize() and
1822 FreeLargeBuffer()) from the AbstractMessageIOGateway class.
1823 o Fixed some typos in the comments in the delphi subfolder.
1824 * The Hashtable class no longer generates warnings when compiled
1825 under MSVC with -DMUSCLE_AVOID_MINIMIZED_HASHTABLES defined.
1826 * Fixed a bug in IPAddressAndPort::ToString() that caused IPv4
1827 address strings to be formatted ambiguously when (preferIPv4Style)
1828 was set to false.
1829
1830 5.82 Released 10/1/2012
1831 - Rewrote the Hashtable class so that it now saves memory by
1832 internally using smaller per-slot index values (e.g. uint8 or
1833 uint16, rather than uint32) in Hashtables with fewer than 65,535
1834 slots in their HashtableEntry-array.
1835 - Added support for compiling with -DMUSCLE_AVOID_MINIMIZED_HASHTABLES,
1836 which will disable the above optimization (since sometimes you'd
1837 rather use more memory and have faster code execution)
1838 * Fixed ZLibUtilityFunctions.cpp so that it will again build when
1839 -DMUSCLE_SINGLE_THREAD_ONLY is defined.
1840
1841 5.81 Released 9/13/2012
1842 - If compiled with -DMUSCLE_ENABLE_DEADLOCK_FINDER,
1843 HandleStandardDaemonArgs() will now look for a "deadlockfinder"
1844 argument that can be used to force deadlock-prints on or off.
1845 - Rewrote the ZLibUtilityFunctions.cpp calls to use
1846 ThreadLocalStorage rather than shared ZLibCodec objects
1847 serialized by Mutexes. This change helps avoids any possibility
1848 of deadlocks, and also improves performance because now multiple
1849 threads can inflate and/or deflate data in parallel. For systems
1850 without a ThreadLocalStorage implementation, the old
1851 implementation can still be used as a fallback, by compiling with
1852 -DMUSCLE_AVOID_THREAD_LOCAL_STORAGE.
1853 - The pthreads implementation of the ThreadLocalStorage now uses
1854 the destructor-callback feature of pthread_create_key() to ensure
1855 that created thread-local-data objects are destroyed in a timely
1856 manner (i.e. when their host thread exits, rather than only when
1857 the ThreadLocalStorage object destructor runs)
1858 o ParseHexBytes() no longer treats commas as token-separator
1859 characters, that way they can be escaped (by prefixing them
1860 with a slash) and entered as ASCII literals.
1861
1862 5.80 Release 8/30/2012
1863 - Added a new "micromessage" folder that contains a C API
1864 with functions for constructing and parsing Message data
1865 directly to/from its flattened form, with no intermediate
1866 representations, flattening/unflattening, or dynamic memory
1867 allocation necessary. This API would be appropriate for
1868 embedded or other severely constrained environments.
1869 - Added "testmicro", "microchatclient", and "microreflectclient"
1870 programs to the tests folder, to serve as tests and examples
1871 for the new MicroMessage and MicroMessageGateway APIs.
1872 - Added a new constructor to the FilePathInfo class that
1873 allows explicit/manual setting of the file info parameters.
1874 - Added MoveName*() methods to the Message class, so that
1875 the iteration order of the fields in the Message can
1876 be easily modified.
1877 o Made String::Flatten(), String::Unflattened(), and
1878 String::FlattenedSize() into inline methods.
1879 * IsMulticastIPAddress() now returns true for IPv6-mapped
1880 IPv4 multicast addresses (e.g. ::ffff:239.255.1.2)
1881 * Fixed a bug in MutexGuard class declaration, private
1882 copy-constructor had wrong argument type.
1883 * Fixed some inaccurate comments in ZipUtilityFunctions.h
1884 * Fixed the "chatclient" test; it was forgetting to read
1885 from stdin.
1886
1887 5.72 Released 6/27/2012
1888 - Added HexBytesToAnnotatedString() functions to the
1889 MiscUtilityFunctions API. These are similar to
1890 PrintHexBytes(), but they output to a String rather
1891 than to a file.
1892 - ParseHumanReadableTimeIntervalString now correctly parses
1893 non-integral values (e.g. "3.5 minutes")
1894 * Fixed a constant-overflow error in testbytebuffer.cpp
1895 * Fixed the gcc implementation of MuscleX86SwapInt16(),
1896 which would fail to compile under gcc 4.7 on 64 bit targets.
1897 * Usage of the uintptr typedef no longer causes warnings under
1898 MSVC when the /Wp64 compiler flag is specified.
1899 * Cleaned up some other miscellaneous MSVC warnings.
1900
1901 5.71 Released 6/11/2012
1902 - Added a WasSignalCaught() function to SignalHandlerSession.h.
1903 This method will return true iff any SignalHandlerSession ever
1904 caught a signal in the current process.
1905 - Added global SetMainReflectServerCatchSignals() and
1906 GetMainReflectServerCatchSignals() functions to
1907 SignalHandlerSession.h to allow easy programmatic enabling
1908 and disabling of the standard signal handling routines.
1909 - Added WithPrefix(), WithSuffix(), WithoutPrefix(), and
1910 WithoutSuffix() convenience methods to the String class.
1911 - Added TruncateChars() and TruncateToLength() convenience
1912 methods to the String class.
1913 - Added an StartsWithNumber() convenience method to the String class.
1914 - Added Append*(), Read*(), and Write*() methods to the ByteBuffer
1915 class for easier endian-aware adding and retrieiving of various
1916 primitive datatypes from a ByteBuffer's data array.
1917 - Added a SetDataFlags() and IsEndianSwapEnabled() methods to
1918 the ByteBuffer class to help the user specify what data
1919 endian-ness logic the ByteBuffer should apply in its Append*(),
1920 Read*(), and Write*() method calls.
1921 - Added a testbytebuffer.cpp test to the tests folder to test
1922 the new data adding/retrieval routines.
1923 - Added a PointerAndBool class that stores a pointer and a boolean
1924 using no more space than that of a pointer by itself (unless
1925 -DMUSCLE_AVOID_BITSTUFFING is enabled).
1926 o Renamed MUSCLE_AVOID_REFCOUNT_BITSTUFFING to
1927 MUSCLE_AVOID_BITSTUFFING, since bit-stuffing is no longer
1928 specific to the RefCount class.
1929
1930 5.70 Released 5/8/2012
1931 - NodePathMatcher::DoTraversal() now returns the number of
1932 DataNodes that the traversal visited.
1933 * Fixed a bug in Queue::Clear() that would cause it only to reset
1934 the first item in the queue rather than all of the items.
1935 * Range-checking in DenybblizeData was incorrect (it would spuriously
1936 reject characters 'G' through 'P'). Fixed.
1937
1938 5.69 Released 4/18/2012
1939 - Made Queue::Clear() a bit more efficient.
1940 - Exposed the DefaultConsoleLogger and DefaultFileLogger
1941 classes in LogCallback.h so they can be re-used elsewhere.
1942 - Added an Indent() convenience method to the String class.
1943 - The matching logic in AndOrQueryFilter and NandNotQueryFilter
1944 now has additional short-circuit logic for better efficiency.
1945 - StorageReflectSession::RestoreNodeTreeFromMessage() now
1946 has an optional (quiet) argument, which can be used to prevent
1947 db-subscription-updates from being triggered when the subtree
1948 is installed into the database.
1949 o Rewrote the String::Arg() methods to take C-native argument
1950 types rather than fixed-size types (e.g. int instead of int32)
1951 so that explicit typecasting is no longer required to avoid
1952 ambiguous-argument-type compile errors that previously could
1953 occur under certain compilers.
1954 o Tweaked the .pro files in the qtsupport folders to make them
1955 compatible with Qt 5.0.
1956 o DenybbleizeData() now returns B_ERROR when passed a string
1957 with an invalid (odd) length, rather than causing an
1958 assertion failure.
1959 * Inet_NtoA() now formats IPv4-mapped IPv6 addresses in the
1960 IPv4 style, if (preferIPv4Style) is set to true.
1961 * Merged in more Haiku-compatibility fixes provided by Fredrik.
1962
1963 5.68 Released 3/23/2012
1964 - Added an optional (retPort) argument to GetPeerIPAddress().
1965 - Added optional "spamspersecond" and "spamsize" arguments to
1966 hexterm, so that you can have hexterm automatically generate
1967 random output at a specified rate for performance testing.
1968 - Added a "quietreceive" argument to hexterm so that if you
1969 don't want to see a printout of the bytes being received,
1970 you don't have to.
1971 - Added GetDistanceTo() and GetSquaredDistanceTo() methods
1972 to the Point class.
1973 o Privileged-address matching is now done using IPv4-style
1974 address strings for IPv4 addresses (even when compiled with
1975 IPv6 support enabled), per Lior's request.
1976 * Merged in some Haiku-compatibility fixes provided by
1977 Fredrik Modeen.
1978
1979 5.67 Released 2/3/2012
1980 - Added a AreOutgoingMessagesIndependent() method to the
1981 MessageIOGateway class, to allow better control over how
1982 outgoing Messages are deflated when zlib-encoding is enabled.
1983 - Removed some unnecessary data members from certain Message
1984 field-object classes, to cut down on memory usage.
1985 - Added a Queue::GetItemAtUnchecked() method.
1986 - Added a RemoveName() to the Python Message class.
1987 o Cleaned up the Python code to avoid pychecker warnings
1988 o Removed Queue::GetItemPointer(). Use Queue::GetItemAt() instead.
1989 * BitChord::ToHexString() was broken -- fixed.
1990 * Queue::GetItemAt() would return a garbage pointer if passed
1991 an invalid index. Fixed to return NULL (as documented) instead.
1992 * Fixed a problem in QSignalHandler and QDataIODevice that could
1993 occasionally cause a CPU-spin on shutdown under MacOSX/Lion.
1994
1995 5.66 Released 1/5/2012
1996 - Added a CountedRawDataMessageIOGateway class to
1997 RawDataMessageIOGateway.{cpp,h}. This class is the same as
1998 its RawDataMessageIOGateway superclass, except that it is
1999 instrumented to keep a running count of the number of raw
2000 data bytes currently held in its output-queue.
2001 - Added a CountedMessageIOGateway class to MessageIOGateway.{cpp,h}.
2002 This is similar to the CountedRawDataMessageIOGateway class
2003 described above, except it tracks Message sizes.
2004 - Added a PopNextOutgoingMessage() virtual method to the
2005 MessageIOGateway class, so that subclasses can override its
2006 behavior if necessary.
2007 - Added EventLoopCycleBegins() and EventLoopCycleEnds()
2008 virtual method hooks to the ReflectServer class.
2009 o AbstractMessageIOGateway::AddOutgoingMessage() is now virtual.
2010 o Trying to use -DMUSCLE_USE_POLL under Windows without declaring
2011 an appropriate value for -DWIN32_WINNT now gives an informative
2012 compile-error message rather than the inscrutible errors that
2013 would appear previously.
2014 * Fixed minor bug in kqueue that could cause obsolete entries
2015 to remain in the _bits Hashtable.
2016 * Fixed a bug in the RawDataMessageIOGateway class that would cause
2017 it to emit Messages with a what-code of 0 (rather than
2018 PR_COMMAND_RAW_DATA) when in immediate-forward mode.
2019
2020 5.65 Released 12/22/2011
2021 - Added experimental support for kqueue under FreeBSD/MacOSX,
2022 enabled by defining -DMUSCLE_USE_KQUEUE on the compile line.
2023 - Added experimental support for epoll under Linux
2024 enabled by defining -DMUSCLE_USE_EPOLL on the compile line.
2025 - Updated testsocketmultiplexer.cpp to make it more useful for
2026 gathering performance statistics for the various SocketMultiplexer
2027 implementations.
2028
2029 5.64 Released 12/13/2011
2030 - Added a SocketMultiplexer class (util/SocketMultiplexer.{cpp,h})
2031 that acts as an API-agnostic wrapper around select() or poll(),
2032 depending on whether MUSCLE_USE_POLL is defined or not.
2033 - MuscleSupport.h now declares uintptr and ptrdiff types that
2034 are guranteed to be the same size as a native pointer.
2035 - Added a PseudoFlattenable base class to Flatten.h, for subclasses
2036 that want to act like Flattenable objects but don't want to incur
2037 the memory overhead of actually having virtual methods.
2038 o Modified all MUSCLE code to use a SocketMultiplexer object
2039 rather than calling select() or poll() directly.
2040 o Added a testsocketmultiplexer.cpp test to the tests folder.
2041 * RefCount.h now uses uintptr instead of (unsigned long) when doing
2042 its pointer-bit-stuffing magic, to avoid pointer-truncation warnings
2043 from MSVC.
2044 * Message::FindFlat() now does the right thing when an object
2045 is added to the Message as a FlatCountableRef and then
2046 retrieved from the Message by value.
2047
2048 5.63 Released 12/1/2011
2049 - Added a MUSCLE_USE_POLL build option which, if defined,
2050 will cause ReflectServer::RunEventLoop() to base its
2051 event loop around poll() rather than select(). The benefit
2052 of this is that with poll() the FD_SETSIZE limit imposed
2053 by select() can be be avoided.
2054 - Made a number of previously protected methods in the
2055 AbstractReflectSession class public.
2056 - StorageReflectSession::PrintSessionsInfo() and
2057 StorageReflectSession::PrintFactoriesInfo() now print
2058 additional information about the state of the sessions/factories.
2059 - The Thread constructor now takes an optional boolean argument,
2060 so that you can now create a Thread that doesn't allocate a
2061 socket-pair for inter-thread messaging purposes. This is useful
2062 when you want to create a lot of Threads but don't need to
2063 use socket-based inter-thread signalling and don't want to
2064 allocate a lot of sockets.
2065 - Added a FastClear() method to the Queue class (for when
2066 you care more about performance than about having item
2067 destructors get called right away).
2068 - Added a RemoveDuplicateItems() method to the Queue class.
2069 o Retired the MUSCLE_ENABLE_MULTICAST_API compiler flag, and added
2070 MUSCLE_AVOID_MULTICAST_API in its place. (Which is another way
2071 of saying that the MUSCLE Multicast API calls are now enabled
2072 by default)
2073
2074 5.62 Released 11/2/2011
2075 - Added a CountedObject<T> class that various other MUSCLE classes
2076 now subclass from. Subclassing from the CountedObject<T> class
2077 allows the application to efficiently keep track of the number
2078 of objects allocated of that type, for debugging/monitoring
2079 purposes.
2080 - Added a PrintCountedObjectInfo() function that prints to stdout
2081 a report of how many objects of each counted type are currently
2082 allocated.
2083 - Added a GetCountedObjectInfo() function that returns a Hashtable
2084 containing all of the current CountedObject counts.
2085 - Added support for a -DMUSCLE_AVOID_OBJECT_COUNTING compiler
2086 definition that will turn the object-counting code into a no-op
2087 if you want it disabled.
2088 - The Python Message.PrintToStream() method now recursively prints
2089 sub-Messages by default. It has arguments that can be used to
2090 limit the depth of the recursion, if desired.
2091 - Added XINT64_FORMAT_SPEC macros to MuscleSupport.h.
2092 - MCRASH now calls __builtin_trap() under gcc/g++, rather than
2093 writing to an invalid pointer.
2094 - Added a GetGlobalObjectForType() function, which is similar
2095 to GetDefaultObjectForType() except that the returned reference
2096 is not read-only.
2097 o Merged in Jean-François Mullet's patches to allow MUSCLE to be
2098 compiled cleanly under Android.
2099 * Fixed the code so that it now compiles cleanly under clang++ 2.1.
2100 * String::AppendWord() no longer appends a separator string if
2101 the word to be appended is blank.
2102 * Added some missing string constant declarations to
2103 storage_reflect_constants.py
2104 * Fixed a bug an exception-string-formation line of message.py
2105 * Fixed a bug in StorageReflectSession::NodeChanged() that would
2106 cause incorrect PR_RESULT_UPDATE updates to be generated for
2107 subscribers using QueryFilter objects, if the matches-filter
2108 status of the node was changed by the node update.
2109
2110 5.61 Released 9/28/2011
2111 - Added a GetCurrentStackUsage() method to the Thread class.
2112 - Added a CheckThreadStackUsage() function and CHECK_THREAD_STACK_USAGE
2113 Macro to Thread.{cpp,h} to make it easier to determine if and
2114 when a Thread is allocating more stack space than it was allowed
2115 to allocate.
2116 - Added a ThreadPool class to the system folder.
2117 - Added EINTR-proof wrapper functions to NetworkUtilityFunctions.h
2118 for recv(), recvfrom(), send(), sendto(), read(), and write().
2119 MUSCLE code now calls the wrapper functions (e.g. recv_ignore_eintr)
2120 so that incoming signals won't cause spurious errors to be returned.
2121 - Added an Arg(const void *) method to the String class, so that
2122 Arg() can be used to print out pointer values.
2123 o Replaced String::AddWord() with String::AppendWord(), which is
2124 easier to use and takes an optional separator-string argument.
2125 * The Point and Rect implementations of String::Arg() were broken; fixed.
2126
2127 5.60 Released 9/19/2011
2128 - Added a qt_advanced_example directory to the qtsupport folder
2129 to demonstrate more advanced usage of the QMessageTransceiverThread
2130 class. See the README.TXT and the diagram PNG in that directory
2131 for details.
2132 - Added a TamperEvidentValue<T> class (in support/TamperEvidentValue.h)
2133 - ThreadWorkerSession and ThreadWorkerSessionFactory objects now
2134 have (and use) a SendMessageToSupervisorSession() method for
2135 sending messages to their supervisor. This is more efficient
2136 and less error-prone that calling BroadcastMessgeToAllSessions(),
2137 and relying on non-supervisor recipients to ignore the Messages
2138 that weren't meant for them, as was done previously.
2139 - Added SetForwardAllIncomingMessagesToSupervisor() and
2140 IsForwardAllIncomingMessagesToSupervisor() methods to the
2141 ThreadWorkerSession, ThreadWorkerSessionFactory, and
2142 MessageTransceiverThread classes. These methods govern how
2143 Messages incoming from remote peers should be handled.
2144 o Retired the MUSCLE_USE_IPV6 compiler option, since enabled
2145 IPv6 support is now the default. If you want to disable IPv6
2146 support, you'll need to specify -DMUSCLE_AVOID_IPV6 instead.
2147 o ThreadSupervisorSession::SendMessageToWorkers() is now
2148 protected rather than private.
2149 o MessageTransceiverThread::GetNextEventFromInternalThread
2150 now passes PR_RESULT_* Messages to the caller, so that it's
2151 possible to use a MessageTransceiverThread as if it it were
2152 a client to the local MUSCLE thread, if desired.
2153 o QMessageTransceiverThread now calls SetDoLogging(false)
2154 inside CreateReflectServer() rather than afterwards, so
2155 that subclasses can easily re-enable logging if they want to.
2156 * Gave the README.TXT file a badly needed rewrite/update.
2157 * Tweaked the doxygen.dox file to yield better-looking
2158 Doxygen HTML documentation.
2159 * genDocs.sh now automatically extracts the current
2160 MUSCLE version number from MuscleSupport.h, so it's
2161 no longer necessary to manually update the muscle.dox
2162 file for each MUSCLE release.
2163
2164 5.57 Released 9/16/2011
2165 - Added the following new compile-time constant
2166 definitions to NetworkUtilityFunctions.h:
2167 MUSCLE_EXPECTED_MTU_SIZE_BYTES
2168 MUSCLE_POTENTIAL_EXTRA_HEADERS_SIZE_BYTES
2169 MUSCLE_IP_HEADER_SIZE_BYTES
2170 MUSCLE_MAX_PAYLOAD_BYTES_PER_UDP_ETHERNET_PACKET
2171 These constants (particularly the last one) are
2172 useful for deciding how many bytes of data can
2173 be added to a UDP packet without risking packet
2174 fragmentation.
2175 - testudp now prints out the values of the above
2176 constants when it is run.
2177 - Added a SetCount() method to the NestCount class.
2178 - HandleStandardDaemonArgs() now accepts "realtime_rr"
2179 or "realtime_fifo" as alternatives to the pre-existing
2180 "realtime" keyword, for those who like to specify
2181 their scheduling algorithm explicitly.
2182 * The PacketTunnelIOGateway constructor now uses
2183 MUSCLE_MAX_PAYLOAD_BYTES_PER_UDP_ETHERNET_PACKET as
2184 its default maxTransferUnit value, rather than hard-coding
2185 a magic value of 1500 (which was too large anyway)
2186 * Fixed a bug that could cause Snooze64(MUSCLE_TIME_NEVER)
2187 to return immediately, rather than sleeping forever as
2188 intended.
2189 * GetHumanReadableTimeIntervalString(MUSCLE_TIME_NEVER)
2190 now returns "forever", rather than "584,942 years".
2191 * Fixed warning in DemandConstructedObject == operator.
2192 * Fixed warning in ZLibCodec destructor.
2193
2194 5.56 Released 9/4/2011
2195 - Added a StorageReflectSession::PrintFactoriesInfo()
2196 method to go with the existing PrintSessionsInfo() method.
2197 - Added InsertItemAtSortedPosition() methods to the Queue
2198 class, for convenience in doing insertion-sorting.
2199 - Added SetSuggestedStackSize() and GetSuggestedStackSize()
2200 methods to the Thread class.
2201 - Added a IsSymLink() method to the FilePathInfo class.
2202 - Added a qt_muscled folder to the qtsupport sub-directory.
2203 The .pro file in this folder builds a version of muscled that
2204 runs in a Qt GUI window.
2205 - Added a "Clone Window" button to the qt_example application,
2206 to make quick demonstrations of multiple-client scenarios
2207 easier.
2208 - The qt_example application is now more colorful -- each
2209 client gets assigned his own (random) color.
2210 o Added checks for (sizeof(float)==4) and (sizeof(double)==8)
2211 to the SanitySetupSystem constructor.
2212 o PrintHexBytes() and LogHexBytes() now take a
2213 ConstByteBufferRef rather than a ByteBufferRef, since
2214 they don't ever need to modify the ByteBuffer they receive.
2215 o DataNode objects now store their ordered-child index as
2216 a Queue of DataNodeRefs rather than a Queue of String pointers.
2217 This avoids any possibility of dangling pointers in the index.
2218 o DataNode::GetIndex() now returns a (Queue<DataNodeRef> *)
2219 rather than a (Queue<const String *> *).
2220 o DataNode::ReorderChild() now takes a DataNodeRef rather
2221 than a reference to a DataNode object.
2222 o Added util/FilePathInfo.cpp, and Moved the non-trivial
2223 FilePathInfo method bodies into it.
2224 o Made FileDescriptorDataIO.cpp compile (as a no-op)
2225 under Windows, to avoid project-file confusion.
2226 * CPULoadMeter::GetCPULoad() now uses uint64s to store tick
2227 counts rather than uint32s, to avoid potential overflows.
2228 * SysLog.cpp now works around the lack of a declaration
2229 for TzSpecifiedLocalTimeToSystemTime() function when compiling
2230 under Windows with the Mingw compiler.
2231 * Made several other tweaks for Mingw32 compatibility.
2232 * Fixed the qt_muscled.pro to work under Windows.
2233 * Fixed a bug in the qt_example application that would cause
2234 a qt_example client to disconnect and reconnect whenever
2235 the server-name field lost focus.
2236
2237 5.55 Released 7/28/2011
2238 - Added a "plain" keyword to hexterm's arguments; useful
2239 if you don't want any headers in hexterm's output
2240 - Made it possible to embed hexterm as part of a larger program.
2241 - Added Arg() methods to the String class that take a bool,
2242 a Point, or a Rect as an argument.
2243 - Added a ToMixedCase() method to the String class.
2244 - Added AddWord() methods to the String class.
2245 - Added HeadWithDefault() and TailWithDefault() methods to the
2246 Queue class that take a default-argument parameter.
2247 - Added a PrintSessionsInfo() method to the StorageReflectSession
2248 class, for quick discovery of what sessions are present and
2249 how much RAM they are each using.
2250 - The ObjectPool class now takes the maximum slab size as
2251 a template argument, and has an assertion-check to make
2252 sure that the resulting objects-per-slab count is small
2253 enough to be tracked by a uint16 (i.e. is less than 65536)
2254 * Fixed a crashing bug in hexterm's ASCII mode.
2255
2256 5.54 Released 6/24/2011
2257 - Added a GetDefaultObjectForType() templated function to
2258 MuscleSupport.h. This function returns a reference to
2259 a default-constructed static object of the specified type.
2260 - Added a description of the Hashtable class's feature set
2261 to the Hashtable Doxygen documentation.
2262 - Added a const [] operator to the Hashtable class. The
2263 [] operator behaves the same as the GetWithDefault() method.
2264 - Expanded and enhanced the Doxygen per-class documentation
2265 of various classes.
2266 o Reduced sizeof(Queue), sizeof(Hashtable), and
2267 sizeof(ObjectPool) by removing their default-object member
2268 items and adding calls to GetDefaultObjectForType() instead.
2269 o Replaced the various get-default-object convenience methods
2270 (GetEmptyString(), GetEmptyMessage(), etc) with inline
2271 call-throughs to GetDefaultObjectForType<Foo>().
2272
2273 5.53 Released 6/16/2011
2274 - Added TarFileWriter.{cpp,h} to the zlib folder. This class
2275 allows for quick inline writing of .tar files to disk.
2276 - Added a MUSCLE_MAY_ALIAS macro to MuscleSupport.h, as
2277 an easier way to invoke gcc's __attribute__((__may_alias__)).
2278 This macro expands to empty under other compilers.
2279 - Added a version of the muscleCopyIn() function that returns
2280 the copied-in value, for convenience.
2281 - Added a DemandConstructedObject template (in
2282 util/DemandConstructedObject.h) to allow for member variables
2283 whose constructors aren't called until the object is actually
2284 needed for something.
2285 - Added a ClearAndFlush() method to the String class, for
2286 forcing a String object to free its allocated data.
2287 o Reduced sizeof(String), by by employing a union to reuse
2288 the bytes used for referencing small and large char arrays.
2289 o Reduced sizeof(Ref) by storing the boolean (doRefCount)
2290 value in the least significant bit of the item pointer.
2291 (this works because the item pointers are guaranteed
2292 to be word-aligned -- if for some reason that guarantee
2293 isn't valid for a given environment, the old method can
2294 be reinstated by adding -DMUSCLE_AVOID_REFCOUNT_BITSTUFFING
2295 to your compiler arguments)
2296 o Reduced sizeof(DataNode) by making the subscribers table
2297 demand-allocated, rather than a member variable.
2298 o Removed the MUSCLE_CPU_REQUIRES_DATA_ALIGNMENT define,
2299 because it is no longer used anywhere.
2300 * Rewrote the HashtableIterator class to no longer use
2301 type-punning trickery, so that g++ versions 4.4.0 and higher
2302 no longer complain about strict aliasing being broken.
2303
2304 5.52 Released 6/8/2011
2305 - Added a Tuple::Contains() convenience method.
2306 - Added a ExecuteSynchronousMessageSend() method to the
2307 MessageIOGateway class. This method is similar to
2308 ExecuteSynchronousMessageRPCCall(), except that this method will
2309 return to the caller as soon as the Message is sent, without
2310 waiting for the server to return a reply Message.
2311 - Added CreateSynchronousPingMessage() and IsSynchronousPongMessage()
2312 hook methods to the MessageIOGateway class, so that subclasses can
2313 specify alternative ping/pong Messages if they wish to.
2314 - Added a IsCharInLocalArray() method to the String class.
2315 - Added a IsItemLocatedInThisContainer() method to the Queue class.
2316 - Added a GetNumUnusedItemSlots() method to the Queue class.
2317 - Added a + operator and += operators for the ByteBuffer class.
2318 - Made the + operators for the String class more efficient.
2319 o Converted the ExecuteSynchronousMessageRPCCall() functions into a method
2320 of the MessageIOGateway class, so that its behavior can be used in conjunction
2321 with a MessageIOGateway subclass to customize their behavior, if necessary.
2322 * Some of the methods in the Queue class could access freed memory
2323 if passed in references to held data items, and a reallocation occurred. Fixed.
2324 * Some of the methods in the String class could access freed memory
2325 if passed in references to their own string, and a reallocation occurred. Fixed.
2326 * Some of the methods in the ByteBuffer class could access freed memory
2327 if passed in a pointer to their own bytes, and a reallocation occurred. Fixed.
2328 * Fixed a bug in StorageReflectSession::NodePathMatcher::CheckChildForTraversal()
2329 that could cause the traversal callback to be called with an invalid DataNode,
2330 likely causing the callback to crash. This bug was a regression introduced
2331 in the 5.51 release.
2332 * CalculateChecksumForFloat() and CalculateChecksumForDouble() would return
2333 different checksum values for 0.0 and -0.0, even though the == operator
2334 considers them equivalent. Fixed.
2335
2336 5.51 Released 5/23/2011
2337 - Added convenience methods to the Queue class: HeadWithDefault(),
2338 TailWithDefault(), RemoveHeadWithDefault(), RemoveTailWithDefault(),
2339 and RemoveItemAtWithDefault(). These methods are all safe to call
2340 even when the Queue is empty.
2341 - Added a SLIPFramedDataMessageIOGateway class to the iogateway
2342 folder. As the name suggests, it is used to do SLIP encoding
2343 and decoding on outgoing and incoming raw data, respectively.
2344 - Added an AppendByte() method to the ByteBuffer class, for convenience.
2345 - The WARN_OUT_OF_MEMORY macro now prints the number of bytes that
2346 the failed memory allocation attempted to allocate.
2347 - Added SetExpendable() and IsExpendable() methods to the
2348 AbstractReflectSession class, to help influence which sessions
2349 will be thrown under the bus in a low-memory situation.
2350 o The QueryFilter::Matches() methods have been modified to take a
2351 (ConstMessageRef &) argument instead of (const Message &), so that
2352 it is now possible to create a QueryFilter subclass that modifies
2353 the data it returns. (Not that any of the QueryFilter subclasses
2354 included in the MUSCLE distribution currently do this)
2355 o Removed the optional MemoryAllocator pointer argument from the
2356 ReflectServer constructor. Now ReflectServer simply accesses the
2357 installed MemoryAllocator object directly (via
2358 GetCPlusPlusGlobalMemoryAllocator()) when necessary.
2359 * When MUSCLE_USE_IPV6 is defined, SharedFilterSessionFactory now
2360 compares ip_address objects using ip_address::EqualsIgnoreInterfaceIndex()
2361 instead of the == operator. This avoids spurious mismatches between IPv4
2362 addresses that have their interface index set, and those that don't.
2363 * UnparseArgs(const Message &) wasn't escaping quote marks embedded
2364 in the strings in the Message. Fixed.
2365 * UnparseArgs(const Message &) wasn't properly handling multiple values
2366 filed under the same field name. Fixed.
2367
2368 5.50 Released 4/18/2011
2369 - Added a qt_muscled_browser subfolder to the qtsupport folder. qt_muscled_browser
2370 is a GUI MUSCLE database browser, based on code contributed by Jean-François Mullet.
2371 - Added GetFirstKeyWithDefault(), GetLastKeyWithDefault(), GetFirstValueWithDefault(),
2372 and GetLastValueWithDefault() convenience methods to the Hashtable class.
2373 - Added a RemoveWithDefault() convenience method to the Hashtable class.
2374 - Added a CountAverageLookupComparisons() method to the Hashtable class,
2375 to help determine the hashing performance of various hash functions.
2376 - Added a -DMUSCLE_WARN_ABOUT_LOUSY_HASH_FUNCTIONS preprocessor define,
2377 which will cause the Hashtable reallocator to calculate the hashtable's
2378 average lookup comparisons value after every hashtable resize, and
2379 complain if the average lookup count is too high.
2380 - Added 3-argument constructors to the AndOrQueryFilter and NandNotQueryFilter classes.
2381 - Added regex/FilePathExpander.{cpp,h}. These files contain a single function,
2382 ExpandFilePathWildCards(), which expands wildcarded file paths into a list of
2383 non-wildcarded paths, similar to shell expansion.
2384 - Added test/testmatchfiles.cpp, a unit test for the ExpandFilePathWildCards() function.
2385 o Moved the boolean "isAnd" argument to the front of the arguments list for the
2386 AndOrQueryFilter constructors.
2387 o Removed the -DMUSCLE_COLLECT_HASHTABLE_COLLISION_STATISTICS preprocessor
2388 define, since the new -DMUSCLE_WARN_ABOUT_LOUSY_HASH_FUNCTIONS replaces it.
2389 o PortableReflectClient now includes a string showing the current time when you
2390 's'et a node, so it's easier to see the node change in other clients.
2391 * FilePathInfo::SetFilePath(NULL) would crash. Fixed.
2392 * ChildProcessDataIO::System() and ChildProcessDataIO::LaunchChildProcess()
2393 weren't NULL-terminating their argv arrays. Fixed.
2394
2395 5.43 Released 3/29/2011
2396 - Added GetSocketBlockingEnabled() function to NetworkUtilityFunctions.{cpp,h}
2397 - Added GetSocketNaglesAlgorithmEnabled() function to NetworkUtilityFunctions.{cpp,h}
2398 - Added GetSocketSendBufferSize() function to NetworkUtilityFunctions.{cpp,h}
2399 - Added GetSocketReceiveBufferSize() function to NetworkUtilityFunctions.{cpp,h}
2400 - Added GetUDPSocketBroadcastEnabled() function to NetworkUtilityFunctions.{cpp,h}
2401 - hexterm now batches its stdin input together to send in fewer buffers, if possible.
2402 - Added a libmuscle.a target to the Makefile in the server folder.
2403 - Directory::MakeDirectory() now takes an optional third argument to specify
2404 whether the pre-existence of the requested directory should be considered an error.
2405 - Added a qt_example sub-directory to the qtsupport folder. This directory
2406 contains buildable code for a sample Qt-based GUI MUSCLE client.
2407 * FilePathInfo now handles file paths ending in a slash properly, even if the
2408 filesystem object located at that path is not a directory.
2409 * Fixed hexterm so that it no longer exits prematurely when reading stdin from a file.
2410 * ChildProcessDataIO::System(const Queue<String> &) wasn't declared static. Fixed.
2411
2412 5.42 Released 2/26/2011
2413 - Added SetEnabled() and IsEnabled() methods to the
2414 DetectNetworkConfigChangesSession class.
2415 o Removed the ability to set String objects using an argument of type
2416 'char', because having it was preventing the compiler from catching
2417 errors where an integer is assigned to a String. Use s = String(&c, 1)
2418 instead.
2419 * The SharedMemory wasn't interpreting the return value of shmat()
2420 calls correctly. Fixed.
2421 * Fixed the access privileges of the Hashtable classes so that they now
2422 compile under g++ 4.4.x.
2423
2424 5.41 Released 2/2/2011
2425 - Added a ParseBool() function to MiscUtilityFunctions.{cpp,h}
2426 - Added convenience implementations of PrintHexBytes() and LogHexBytes()
2427 that accept ByteBuffers and ByteBufferRefs.
2428 - PrintHexBytes() and LogHexBytes() can now gracefully accept NULL
2429 pointers without crashing (they will just print out "NULL buffer"
2430 instead of any hex bytes)
2431 - printsourcelocations now filters out commented-out calls to LogTime().
2432 - Hashtable.h now declares a Void class that can be used as a
2433 placeholder for Hashtables that need only keys, not values.
2434 - Added a PutWithDefault() method to the Hashtable class.
2435 - Added a CanRegexStringMatchMultipleValues() function to StringMatcher.cpp.
2436 - Added CaseInsensitiveNumericAwareStringCompareFunctor and
2437 NumericAwareStringCompareFunctor classes to String.h
2438 - printsourcelocations now sorts its output by key before emitting it.
2439 o Added \r and \n to the list of characters that StringTokenizer
2440 will treat as word-separators by default.
2441 * PrintHexBytes() and LogHexBytes() were incorrectly writing some
2442 of their decorative output to stdout, instead of to the specified
2443 FILE stream. Fixed.
2444 * Added some #ifdefs to hexterm.cpp and some logic to the tests Makefile
2445 so that when hexterm is built as part of a Meyer software release,
2446 it will show the standard Meyer software version string.
2447 * ReflectServer::DisconnectSession() now calls ShutdownIOFor() on the
2448 disconnected session, even if the session is to become a lame duck.
2449 That way TCP connections are guaranteed to be disconnected quickly.
2450 * PulseNode::GetCycleStartTime() now returns the correct value even
2451 for PulseNodes that are children of other PulseNodes.
2452 * Hashtable now uses == operator on user-values, not the != operator.
2453 * The Hashtable class's Get(key), GetFirstValue(), and GetLastValue()
2454 methods were not properly enforcing const-correctness. Fixed.
2455
2456 5.40 Released 12/20/2010
2457 - Added various time-units-conversion functions to TimeUtilityFunctions.h
2458 - Added a few time-related constants to TimeUtilityFunctions.h
2459 - Added a DetectNetworkConfigChangesSession class, which can be used
2460 to install a handler that is called whenever the host computer's
2461 networking configuration has changed.
2462 - Added testnetconfigdetect.cpp to the tests folder, as a simple
2463 test/example of using the DetectNetworkConfigChangesSession class.
2464 - Added a TelnetPlainTextMessageIOGateway class, that works similarly
2465 to PlainTextMessageIOGateway, except that it filters out any
2466 telnet-protocol control codes that get sent from the client.
2467 o Made it a no-op to call AbstractReflectSession::EndSession()
2468 on a session that isn't attached to a server. (Previously it
2469 would trigger an assertion failure, but an unattached session
2470 is already effectively ended so there's no point in crying over it)
2471 o Code cleanup: Magic-number time-unit conversions in several places
2472 now use the new time-conversion functions instead, for clarity.
2473 o Simplified the SharedUsageLimitProxyMemoryAllocator. It no longer
2474 maintains a running sum of the total memory usage of the daemon
2475 set, but rather recalculates the current sum when needed.
2476 * The StringMatcher class's copy constructor wasn't initializing
2477 its _bits field to zero, which could cause undefined behavior. Fixed.
2478 * StringMatcher::SetPattern() didn't clear the negate-bit when
2479 setting a non-simple (aka full regex) pattern. Fixed.
2480
2481 5.35 Released 12/5/2010
2482 - Added a MoveToPosition(key, idx) method to the Hashtable class.
2483 - Added a InsertOrderedChildNode() utility method to the
2484 StorageReflectSession class.
2485 - hexterm now includes a version number in its LogUsage() text.
2486 - ChildProcessDataIO::Launch*() can now be told to only capture
2487 output to stderr, or stdout
2488 - Added a GetTotalDataSize() method to the ObjectPool class.
2489 - Added a GetNumAllocatedItemSlots() method to the ObjectPool class.
2490 o Changed QueryFilterRef arguments to ConstQueryFilterRef where appropriate.
2491 o Replaced the (usePty) boolean in ChildProcessDataIO::Launch*()
2492 method with a launchBits bit-chord, so that multiple options
2493 can be specified.
2494 o Renamed Hashtable::GetNumAllocatedSlots() to GetNumAllocatedItemSlots().
2495 * GetSystemMemoryUsagePercentage() was not being calculated
2496 accurately under MacOS/X. Fixed.
2497 * ZLibUtilityFunctions.cpp now installs a cleanup-callback when
2498 necessary, so that any privately allocated ZLibCodec objects
2499 will be deleted as part of the shutdown sequence and thus won't
2500 show up in valgrind as possibly-leaked-memory anymore.
2501 * ByteBuffer::SetBuffer() now deallocates the current buffer if
2502 the new data size is less than half of the current data size,
2503 to avoid wasting memory.
2504
2505 5.34 Released 10/19/2010
2506 - Added an optional (maxAsyncConnectPeriod) argument to the
2507 AddNewConnectSession() and AddNewDormantConnectSession()
2508 methods of the AbstractReflectSession and MessageTransceiverThread
2509 classes.
2510 - Added SetMaxAsyncConnectPeriod() and GetMaxAsyncConnectPeriod()
2511 methods to the AbstractReflectSession class.
2512 - Added an optional MUSCLE_MAX_ASYNC_CONNECT_DELAY_MICROSECONDS
2513 constant to the set of compiler -D flags that the muscle code
2514 looks for during compilation.
2515 - Added Strcasecmp() and Strncasecmp() wrapper functions to
2516 MiscUtilities.h, to hide Windows' inconsistent function names.
2517 - muscled and the programs in the tests folder are now compiled
2518 with the -DMUSCLE_USE_IPV6 flag enabled.
2519 - Added support for "disablestdout" and "disablestderr" startup
2520 arguments, that cause the program to close its STDOUT_FILENO
2521 and STDERR_FILENO file descriptors, respectively (and thus
2522 suppress its output from then on)
2523 - DebugTimer can now accept a negative logLevel parameter, which
2524 will force it to output using printf() instead of LogTime().
2525 - Added a GetSystemMemoryUsagePercentage() function to
2526 MiscUtilityFunctions.{cpp,h}
2527
2528 5.33 Released 8/31/2010
2529 - Added an optional (argIdx) argument to ParseConnectArg()
2530 and ParsePortArg() in MiscUtilityFunctions.{cpp,h}
2531 - Added a udpproxy program to the tests folder. This can
2532 be used to forward UDP packets to and from a further
2533 destination.
2534 - Added a NumericAwareStrcasecmp() function to String.{cpp,h}.
2535 - Added NumericAwareCompareTo() and NumericAwareCompareToIgnoreCase()
2536 methods to the String class.
2537 - Added SetMask() and GetMask() methods to the NumericQueryFilter
2538 class, to allow bitfield masking all numeric QueryFilters.
2539 - Added a printtypecode program to the test folder, for quickly
2540 getting the ASCII representation of a 32-bit type code.
2541 o Changed String::CompareToIgnoreCase() to call strcasecmp()
2542 rather than calling ToUpper() on both strings.
2543 o Removed the OP_CONTAINS_BITS and OP_DOESNT_CONTAIN_BITS operators
2544 from the NumericQueryFilter class, as that functionality can
2545 now be handled more generally via the SetMask() call instead.
2546 * Inet_PtoN now sets the ai_flags value to AI_NUMERICHOST under
2547 Windows, so that non-numeric address strings (e.g. "") are no
2548 longer possibly misinterpreted as valid IP address strings.
2549 * ParseArgs() now un-escapes any escaped quote marks.
2550 * The micromuscle Java classes were still packaged under
2551 com.lcs.*. Changed them to com.meyer.*
2552
2553 5.32 Released 7/22/2010
2554 - Added a GetTimeStampForHumanReadableTimeValues() function
2555 to SysLog.{cpp,h}. This function does the inverse operation
2556 of GetHumanReadableTimeValues().
2557 - Added a HumanReadableTimeValues::ToString() method,
2558 for convenience.
2559 - Added SetFSyncOnClose() and IsFSyncOnClose() methods to the
2560 FileDescriptorDataIO class.
2561 - Added a SortFieldNames() method to the Message class.
2562 - Added FindMatchingNode() and FindMatchingNodes() convenience
2563 methods to the StorageReflectSession class.
2564 - Added a serialproxy utility to the tests folder. This program
2565 exports a local serial port as a TCP port.
2566 - Message::FieldsAreSubsetOf() is now a public method.
2567 o Replaced GetServerUptime() with GetServerStartTime(), so
2568 that the returned value can remain meaningful even if stored
2569 for a period of time.
2570 * Threads in a Java com.meyer.muscle.thread.ThreadPool object
2571 now exit cleanly when they are interrupted (e.g. by an
2572 applet shutdown). Previously they would just ignore the
2573 InterruptedException and stick around, gumming things up.
2574 * The interface-0-send-detect code no longer prints an error
2575 if the destination address is (invalidIP), on the assumption
2576 that the UDP socket was previously connected using
2577 SetUDPSocketTarget() in that case.
2578 * ReceiveDataUDP() now returns correct source-address/port
2579 information even when receiving IPv4 UDP packets while
2580 compiled with the MUSCLE_USE_IPV6 flag defined.
2581
2582 5.31 Released 6/7/2010
2583 - Added LaunchIndepentChildProcess() static methods to the
2584 ChildProcessDataIO class, for quick fire-and-forget style
2585 launching of child processes.
2586 - Added an optional maxWaitTimeMicros argument to the
2587 ChildProcessDataIO::System() methods.
2588 - Added a QDataIODevice adaptor class to the qtsupport folder.
2589 - Made the MUSCLE GetCurrentThreadID() function publicly
2590 available (declared in system/SetupSystem.h).
2591 - Added a MUSCLE_ENABLE_DEADLOCK_FINDER flag.
2592 - The deadlock-finder no longer requires manual insertion
2593 of PLOCK and PUNLOCK macros everywhere; instead, that
2594 functionality is conditionally compiled into the
2595 Mutex class itself.
2596 - Added code to deadlockfinder.cpp to detect inconsistent
2597 sequences and print error messages about them, instead of
2598 just printing out all sequences and leaving it up to the
2599 user to detect any problems.
2600 o The deadlock-finder generation code now stores up its output
2601 in RAM until the process is exiting, and dumps it to stdout
2602 at that time. That way race conditions in accessing stdout
2603 are avoided, so the output won't be garbled.
2604 o LockLog() and UnlockLog() now lock/unlock a separate lock
2605 that is dedicated to the log callbacks only, instead of
2606 calling through to the global muscle lock.
2607 o InflateBuffer() and DeflateBuffer() now use their own
2608 Mutex also, for reasons similar to those listed above.
2609 * The Windows implementation of ChildProcessDataIO now marks
2610 its master/slave notify sockets as non-inheritable, so that
2611 subsequent child process won't hold them open unexpectedly.
2612
2613 5.30 Released 5/7/2010
2614 - Added proper copy/assignment/equality operators to the
2615 StringMatcher class, and added a HashCode() method to
2616 it so that it can be a key in a Hashtable.
2617 - Added OP_CONTAINS_BITS and OP_DOESNT_CONTAIN_BITS operators
2618 to the NumericDataQueryFilter family of classes, so that
2619 you can do some bit-chord logic in a QueryFilter.
2620 - Added an Area() method to the Rect class.
2621 - Added optional checksum calculation and printing to hexterm.
2622 - Added a GetDefaultObject() method to the ObjectPool class
2623 that gives read-only access to the ObjectPool's persistent
2624 default-constructed object.
2625 - Added a GetEmptyByteBuffer() function to ByteBuffer.{cpp,h}
2626 o GetEmptyMessageRef() now returns a ConstMessageRef instead
2627 of a MessageRef, to ensure that the returned Message is
2628 not (easily) modified.
2629 o GetEmptyByteBufferRef() now returns a ConstByteBufferRef
2630 instead of a MessageRef, to ensure that the returned
2631 ByteBuffer is not (easily) modified.
2632 o Simplified the ObjectPool class to make it less error-prone
2633 and easier to use. The function callbacks are gone; instead,
2634 recycled objects are reset to their default state simply by
2635 using their assignment operator to set them equal to a
2636 default-constructed object.
2637 o IsRegexToken() no longer considers ':' to be a regex token.
2638 This change is because ':' is often used in otherwise non-regex
2639 strings, and is never the only regex character in a regex string.
2640 * Fixed some compiler warnings under MSVC 2008
2641 * Fixed a bug that would cause subscriptions not to be properly
2642 unsubscribed in some cases.
2643
2644 5.23 Released 4/22/2010
2645 - The Parse*() functions in MiscUtilityFunctions.{cpp,h} now take
2646 an optional (caseSensitive) boolean argument. If left false
2647 (the default), parsing will be case sensitive, as it was in
2648 previous versions. If set to true, then arguments will be left
2649 in their original case and not forced to lower case.
2650 - Added information to the leaked-ObjectPool-Ref assertion failure
2651 error message, so that now the type and the address of the leaked
2652 reference(s) are printed out as part of the assertion failure.
2653 - Rewrote the ObjectNode class to use uint16 indices instead of
2654 pointers, to reduce memory usage (especially on 64-bit systems)
2655 - Added a Clear() convenience method to the Socket class.
2656 - Added Append() and Prepend() methods to the String class that
2657 take a char as an argument.
2658 o Changed the (recurse) argument in Message::PrintToStream(),
2659 Message::ToString(), and Message::AddToString() to a
2660 (maxRecurseLevel) uint32 argument instead, so that user-specified
2661 maximum recursion depths can be supported.
2662 o Re-organized the GlobalSocketCallbacks so that they all happen
2663 immediately after the socket is created.
2664 o Changed the "Couldn't disable V6-only mode" message to MUSCLE_LOG_DEBUG.
2665 o Made the Message(uint32) constructor explicit.
2666 * Tweaked the code so that hexterm once again compiles under Windows.
2667 * Tweaked NetworkUtilityFunction.cpp to build again even when
2668 MUSCLE_ENABLE_MULTICAST_API is not defined.
2669 * MUSCLE sockets now have IPV6_V6ONLY explicitly disabled when they
2670 are created, so that IPv4-mapped sockets will work even under
2671 operating systems that disable them by default (read: Windows 7)
2672 * The MCRASH macro no longer calls FatalAppExit() under windows;
2673 instead it just writes to a NULL pointer. That way if there is
2674 a crash handler installer, it will run.
2675
2676 5.22 Released 3/3/2010
2677 - Added SetSocketKeepAliveBehavior() and GetSocketKeepAliveBehavior()
2678 functions to NetworkUtilityFunctions.{cpp,h}. Note that these functions
2679 are only available if MUSCLE_ENABLE_KEEPALIVE_API is defined.
2680 - Added SetGlobalSocketCallback() and GetGlobalSocketCallback() to
2681 NetworkUtilityFunctions.{cpp,h}, to allow all TCP sockets in the
2682 process to be set up in a similar way, if desired.
2683 - Added a portablereflectclient.vcproj file to the tests folder, so that
2684 portablereflectclient can be compiled under Microsoft Visual Studio.
2685 - The AtomicCounter class now uses the OSAtomicCounter.h atomic counter
2686 API when compiled under MacOS/X.
2687 - Added an optional (maxReplaceCount) arg to the String::Replace() methods.
2688 - Added a ServerComponent::IsFullyAttachedToServer() method, which returns
2689 true iff AttachedToServer() has already returned success, and
2690 AboutToDetachFromServer() hasn't been called yet.
2691 o Removed MUSCLE_CUSTOM_ATOMIC_TYPE support from the AtomicCounter class,
2692 since it wasn't useful and was cluttering up the code.
2693 o Rewrote the CalculateChecksum() and CalculateChecksumFor*() methods
2694 to call through to CalculateHashCode(), since the existing checksum
2695 algorithms were not very good at avoiding checksum collisions.
2696 * Updated win32client.vcproj and win32client.cpp to build properly again.
2697 * Fixed a couple of typos in AsyncDataIO.cpp.
2698 * GetFileLogName() is no longer included in the MUSCLE_INLINE_LOGGING
2699 headers in SysLog.h, since its inclusion caused chicken-and-egg problems.
2700 * Added inline versions of PrintStackTrace(), GetStackTrace(),
2701 GetLogLevelName(), and GetLogLevelKeyword().
2702 * Made all of the inline log functions into static inlines.
2703
2704 5.21 Released 1/21/2010
2705 - Added UnparseFile() functions to MiscUtilityFunctions.{cpp,h}.
2706 These convert a ParseFile()-style Message back into a text file.
2707 - Added printsourcelocations.cpp to the tests folder. This program
2708 will scan a source code directory tree and print out the 4-letter
2709 source location codes corresponding to all calls to LogTime(),
2710 along with their human-readable location and the line of source code.
2711 * The source code location alphabet had the numeral '5' in it, which
2712 was not supposed to be there (it looks too much like 'S'). Removed it.
2713 * Fixed a bug where UnparseArg("arg= val") wouldn't parse correctly.
2714 * Fixed a potential race condition in ObjectPool::Drain().
2715 * Some dependencies were missing from the VC++ project files; added them.
2716 * Converted RefCount::CheckedGetItemPointer() from a method into
2717 a stand-alone inline function, because calling methods on a NULL
2718 pointer is specified as causing undefined behavior in C++, and
2719 therefore having CheckedGetItemPointer() as a method is unsafe.
2720 * Removed unnecessary files from the vc++ folder, updated vc++/README.txt
2721
2722 5.20 Released 12/29/2009
2723 - PrintStackTrace() is now implemented under MSVC/Win32, using
2724 Jochen Kalmbach's StackWalker class.
2725 - The debugcrashes command line argument is now supported under
2726 MSVC/Win32; with it specified, crashes will cause PrintStackTrace()
2727 to be called, and therefore a stack trace to be printed to stdout.
2728 - Added a GetTotalDataSize() method to the Hashtable and Queue classes,
2729 so that it's possible to query how much RAM the container is using.
2730 - The Message::*Flat() methods are now templated so that the object
2731 you pass in to them doesn't have to be a subclass of Flattenable...
2732 it just have to have necessary methods declared. This lets you
2733 save memory on small flattenable objects since they no longer
2734 need a vtable pointer.
2735 - Added a GetFlattenedByteBufferFromPool() method to ByteBuffer.h.
2736 - The HashtableEntry class now stores references to other
2737 HashtableEntries as uint32 slot indices rather than pointers, so
2738 that its memory footprint doesn't increase on 64-bit systems.
2739 - Added a GetRawArrayPointer() method to the Queue class to
2740 allow direct/low-level access to the Queue's items array.
2741 - UnparseArgs(const Queue &) now takes optional startIdx and
2742 afterEndIdx arguments.
2743 o Rewrote/simplified the HashtableIterator class: Removed all of
2744 the HasMore*(), GetNext*(), and PeekNext*() methods. The only
2745 methods remaining are GetKey(), GetValue(), HasData(),
2746 operator++(), and operator--().
2747 o Rewrote/simplified the MessageFieldNameIterator class: Removed
2748 the HasMoreFieldNames(), GetNextFieldName() and PeekNextFieldName()
2749 methods. The only methods remaining are HasData(), GetFieldName(),
2750 operator++, and operator--.
2751 o The String, Point and Rect classes no longer derive from
2752 Flattenable, and no longer have any virtual methods.
2753 o Removed the (initialSize) constructor argument from the Queue
2754 and PathMatcherQueue classes, since it was rarely used and added
2755 4 bytes to the size of the Queue class.
2756 * debugcrashes is also now enabled under OS/X.
2757 * Rewrote the POSIX implementation of ChildProcessDataIO so that
2758 the marshalling of the child process's arguments array is done
2759 in the parent process rather than between fork() and execve();
2760 that avoids potential problems with doing dynamic memory allocation
2761 during that awkward phase of the child's development.
2762 * Added a work-around in SendDataUDP() for a misfeature of MacOS/X
2763 (and possibly other IP stacks) where sendto() will send on the
2764 default interface even when the destination address clearly
2765 specifies another interface.
2766 * Replaced calls to gmtime() with gmtime_r(), for thread safety.
2767
2768 5.11 Released 11/23/2009
2769 - Added GetHumanReadableTimeIntervalString() to SysLog.h.
2770 - Added GetEmptyByteBufferRef() to ByteBuffer.{cpp,h}.
2771 - Added a DataNode::GetChild() method that returns the result as
2772 a return value rather than as a by-reference parameter.
2773 - ParseHumanReadableTimeIntervalString() can now correctly parse
2774 multiple-clause time interval strings of the type generated by
2775 GetHumanReadableTimeIntervalString().
2776 - Added a GetPulseParent() method to the PulseNode class.
2777 * Removed the MUSCLE_ROUTING_FLAG_REFLECT_TO_SELF bit from the
2778 DEFAULT_MUSCLE_ROUTING_FLAGS_BIT_CHORD constant, since including
2779 this bit made the sessions' default routing behavior different
2780 from what it was (and is) documented to be.
2781 * BatchOperator now calls BatchEnds() from within the batch context
2782 instead of after the batch context has ended, for consistency
2783 with the semantics of BatchBegins().
2784 o Rewrote the Windows implementation of the Mutex class to use
2785 critical sections rather than locking a Windows Mutex directly,
2786 for better performance.
2787 o Renamed the Python files in the python folder from e.g. CamelCase.py
2788 to e.g. lower_underbar_case.py, per the Python Style Guide.
2789 o Made CalculateHashCode() and CalculateHashCode64() non-inline
2790 functions, since they are rather large to be inlined.
2791 * Rewrote the Xenomai implementation of GetRunTime64() to call
2792 rt_timer_tsc() instead of rt_timer_read(), so that the value
2793 returned is nanoseconds-since-boot, not nanoseconds-since-1970.
2794 * The "realtime" command line argument support now memsets() the
2795 sched_param struct to zero before filling it out, just in case
2796 it has other members besides sched_priority.
2797 * Fixed a bug in the Hashtable class where copying one Hashtable
2798 to another could cause multiple identical entries to appear
2799 in the target table's iteration list.
2800
2801 5.10 Released 10/12/2009
2802 - Added a HashCode() method to the Tuple, Point, and Rect classes,
2803 so that they can now be used as keys in a Hashtable.
2804 - Added a Hashtable::Intersect() convenience method.
2805 - Added SetRoutingFlag() and IsRoutingFlagSet() methods to the
2806 DumbReflectSession class. These flags allow subclasses of
2807 DumbReflectSession to change default/unrecognized routing
2808 behavior to be more appropriate for their needs, if necessary.
2809 - Added two new parameters that can be set via
2810 PR_COMMAND_SETPARAMETERS and got via PR_COMMAND_GETPARAMETERS.
2811 They are PR_NAME_ROUTE_GATEWAY_TO_NEIGHBORS and
2812 PR_NAME_ROUTE_NEIGHBORS_TO_GATEWAY and they control the
2813 similarly named bits in the DumbReflectSession class.
2814 - Added a (reconnectViaTCP) argument to the AbstractReflectSession::
2815 SetAsyncConnectDestination() method, so you can specify whether
2816 Reconnect() should connect to the supplied address via a standard
2817 TCP connection, or not.
2818 - The file log name (as set by the "logfile" command line argument
2819 or SetFileLogName()) is now interpreted by
2820 HumanReadableTimeValues::ExpandTokens(), so it can use any of
2821 the standard tokens and they will be expanded to their values
2822 at the time the log file is created.
2823 - File logging now supports maximum log file sizes (via the
2824 "maxlogfilesize=n" keyword and via the new SetMaxLogFileSize()
2825 and GetMaxLogFileSize() functions). When a log file becomes
2826 larger than the specified size, it will be closed and a new
2827 log file opened.
2828 - Log files closed because they are too large can be optionally
2829 gzip-compressed (if the "compresslogfiles" keyword is specified,
2830 or via the new SetFileLogCompressionEnabled() function)
2831 - Added an optional "maxnumlogfiles" argument (and associated
2832 SetMaxNumLogFiles() and GetMaxNumLogFiles() functions) that
2833 allow you to specify that old log files should start to be
2834 deleted after a certain number of log files have been created.
2835 - Added an optional "oldlogfilespattern" argument (and associated
2836 SetOldLogFilesPattern() function) that lets you specify the
2837 pattern of file-paths that can be safely assumed to be old log
2838 files from previous instances of the current application, and
2839 deleted if necessary.
2840 - Added a SetFile() method to the FileDataIO class.
2841 - Added AppendBytes() methods to the ByteBuffer class.
2842 - Added InflateByteBuffer() and DeflateByteBuffer() functions
2843 to ZLibUtilityFunctions.{cpp,h}.
2844 - Added raw-pointer versions of the Inflate(), Deflate(), and
2845 GetInflatedSize() methods of the ZLibCodec class.
2846 - Set EXTRACT_ALL to yes in the muscle.dox file, so that the
2847 non-member functions will show up in the DOyxgen documentation.
2848 - Added Doxygen groups around the non-class APIs, so that they
2849 show up as Modules in the Doxygen HTML.
2850 - Added a brief Doxygen \mainpage introduction blurb.
2851 o Changed the MUSCLE_VERSION macro in support/MuscleSupport.h
2852 from hexadecimal to decimal, so it can be more readable.
2853 o FileDataIO ctor's argument now defaults to NULL.
2854 o Log() and LogTime() no longer inhibit re-entrant calls during
2855 log callbacks. This allows the callbacks to do logging themselves,
2856 although they do need to be careful to avoid infinite recursions.
2857 o GetNumAvailableBytes(), GetMaxNumBytes(), and GetNumUsedBytes()
2858 now return uint64's instead of uint32's, so that they can
2859 deal with more than 4 gigabytes of RAM allocation.
2860 o DumbReflectSession::SetReflectToSelf() and GetReflectToSelf()
2861 are now deprecated inline synonyms for
2862 SetRoutingFlag(MUSCLE_ROUTING_FLAG_REFLECT_TO_SELF) and
2863 GetRoutingFlag(MUSCLE_ROUTING_FLAG_REFLECT_TO_SELF), respectively.
2864 o ParseArgs() no longer strips leading dashes off of the arguments
2865 it parses, because doing that made it impossible to pass negative
2866 numbers as command line arguments.
2867 o Added a PrintStackTrace() comment to SysLog.cpp for easy
2868 copy-and-paste to third party code when necessary.
2869 o Moved the HumanReadableTimeValues class and its related
2870 functions out of MiscUtilityFunctions.{cpp,h} and into
2871 SysLog.{cpp,h}, so that programs that use the system log
2872 but not the other functions in MiscUtilityFunctions.cpp do
2873 not need to link in MiscUtilityFunctions.cpp.
2874 o Moved Atoll() and Atoull() from MiscUtilityFunctions.{cpp,h}
2875 to SetupSystem.cpp and MuscleSupport.h, for the same reasons.
2876 * Fixed some printf() formatting warnings that occurred when the
2877 C code (MiniMessage, etc) was compiled on a 64-bit OS.
2878 * Changed a constant in SharedUsageLimitProxyMemoryAllocator
2879 from MUSCLE_NO_LIMIT to ((size_t)-1) so that it would work
2880 properly under 64-bit OS's.
2881 * NetworkInterfaceInfo::ToString() was broken. Fixed.
2882
2883 5.00 Released 9/16/2009
2884 - Added a MUSCLE_VERSION define that is the numeric counterpart
2885 to the MUSCLE_VERSION_STRING define. This makes it easier to
2886 write code that will build against multiple MUSCLE versions, if
2887 necessary.
2888 - Split DataIO::GetSelectSocket() into two methods, GetReadSelectSocket()
2889 and GetWriteSelectSocket(). This way a DataIO can use two different
2890 file handles for event-catching if it wants to.
2891 - Split AbstractReflectSession::GetSessionSelectSocket() into
2892 GetSessionReadSelectSocket() and GetSessionWriteSelectSocket().
2893 - Reimplemented the ARRAYITEMS macro in C++ land to be a templated
2894 function instead. This has the advantage of making it a compile-time
2895 error if you try to call ARRAYITEMS() with a pointer argument.
2896 - muscleCompare() now depends only on the less-than operator.
2897 Before it depended on less-than and greater-than working as expected.
2898 - Removed the DECLARE_HASHTABLE_KEY_CLASS* macros, since they are no
2899 longer needed. Appropriate HashFunctors are now selected automatically
2900 through SFINAE magic; all the user has to do is add a
2901 "uint32 HashCode() const" method into his key class and it will be used.
2902 - HashFunctor classes now also have a AreKeysEqual() method for determining
2903 whether two keys are equivalent or not in a type-appropriate manner.
2904 - Added support for a MUSCLE_COLLECT_HASHTABLE_COLLISION_STATISTICS #ifdef
2905 which can be used to test the efficacy of different hash functions.
2906 - Added CalculateHashCode() and CalculateHashCode64() functions to
2907 MuscleSupport.h. These functions return hash codes for any array of
2908 bytes using Austin Appleby's MurmurHash2_Aligned algorithms.
2909 - The Hashtable class no longer chooses its array sizes based on prime
2910 numbers; instead it now relies on a better hash function (MurmurHash2.0)
2911 that will hash values well no matter what the array size is.
2912 - Optimized the String class's reallocation strategy to conserve memory
2913 better when dealing with very long strings.
2914 - Added a GetNumAllocatedBytes() method to the String class.
2915 - Added IsValid() and IsNull() convenience methods to the ConstRef class.
2916 - Added a version of DataNode::GetNodePath() that returns a String.
2917 - Added ToCaseInsensitive(const String &) to regex/StringMatcher.h
2918 - Added a PutOrRemove() method to the Hashtable class that takes
2919 a pointer to the value (NULL pointer means remove).
2920 - Added a GetAncestorNode() convenience method to the DataNode class.
2921 - Added ++ and -- operators to the String class. (they add a space
2922 and remove the last character in the string, respectively)
2923 - ParseHumanReadableTimeIntervalString() now recognized special strings
2924 "forever", "never", and "infinite" and will return MUSCLE_TIME_NEVER in
2925 response to any of those keywords.
2926 - ParseFile() can now accept its file data in the form of a String
2927 as well as a (FILE *).
2928 - Added BroadcastToAllSessionsOfType<SessionType>() templated methods
2929 to the AbstractReflectSession and ReflectSessionFactory classes.
2930 - Added GetWithDefault() methods to the Queue class.
2931 - Added a GetDataIO() convenience method to the AbstractReflectSession class.
2932 - Added a GNII_INCLUDE_NONLOOPBACK_INTERFACES,
2933 GNII_INCLUDE_ENABLED_INTERFACES, and GNII_INCLUDE_DISABLED_INTERFACES
2934 flags GetNetworkInterfaceInfos() function's flag argument options.
2935 - Merged in Monni's patch to make the B_SWAP_*() macros call through to
2936 MSVC's _byteswap_*() functions on versions of MSVC that support that.
2937 - Added a Contains(const ItemType &) convenience method to the Queue class.
2938 - AbstractMessageIOGateway now derives from AbstractGatewayMessageReceiver,
2939 so that you can link the input of one gateway directly to the output
2940 of another if you want to.
2941 - Added a SetFilterForEntry() method to the PathMatcher class so that
2942 existing PathMatcherEntry objects can have their filters updated without
2943 throwing the PathMatcher class's filter-count out of whack.
2944 - Added ToString() methods to the PathMatcherEntry and StringMatcherQueue
2945 classes, to better facilitate debugging.
2946 o Removed CStringHashFunc() and CStringHashFunc64() functions; any code
2947 that was previously using those should call CalculateHashCode(s,strlen(s))
2948 instead.
2949 o Split the Hashtable class auto-sort functionality out into subclasses.
2950 The Hashtable class no longer supports auto-sort; instead you now
2951 instantiate an OrderedKeysHashtable or an OrderedValuesHashtable
2952 if you want a table that keeps its data sorted.
2953 o All Hashtable sorting is now done via CompareFunctors instead of
2954 via function pointers.
2955 o Rewrote the Queue::Sort() method to used a templatized CompareFunctor
2956 object instead of a function pointer. This allows the compiler to
2957 inline the comparisons for better performance, and also frees the
2958 programmer from having to manually specify a comparison function in
2959 most cases.
2960 o Remove the Compare*() callback functions from MuscleSupport.h because
2961 they are no longer needed (use functors instead)
2962 o Made PulseNode::InvalidatePulseTime() public instead of protected.
2963 o Made the object-capturing constructors in the RefCount and ConstRefCount
2964 classes explicit, so that object-capture can't happen without the
2965 programmer's explicit knowledge.
2966 o ExecuteSynchronousMessageRPCCall() now returned an empty Message
2967 if it connects successfully but receives no reply. That way the
2968 caller can differentiate that case from the could-not-connect case.
2969 o Removed UNLESS() macro, since it was never used and was bad style.
2970 o FindFirstSessionOfType() and FindSessionsOfType() template methods
2971 now take <SessionType> as their template argument, not <SessionPointerType>
2972 o Removed some characters from the source-location-code alphabet to
2973 reduce the risk of inadvertent swearing in the lock file.
2974 * Rewrote the Windows implemetation of StdinDataIO (again) so that closing
2975 a StdinDataIO object no longer tries to shut down the Stdin I/O thread.
2976 That appears impossible to do reliably under the awesome Windows API,
2977 so now the Stdin I/O thread is a singleton that always runs (safely
2978 minding its own business) until stdin closes.
2979 * Fixed a typo in MessageTransceiverThread.py
2980 * ExecuteSynchronousMessageRPCCall() now includes the TCP-connect time
2981 in its calculations regarding the timeout period.
2982 * ParseHumanReadableTimeInterval() now defaults to seconds when
2983 no units are specified (previously it would return zero in that case).
2984 * String::operator-(const char) had a bug where it would read one
2985 byte too many as part of its memmove() call. Fixed.
2986 * Atoll() and Atoull() weren't handling invalid strings
2987 (with preceding non-digit characters) properly. Fixed.
2988 * Added a _M_AMD64 case ot the LITTLE_ENDIAN byte ordering detection,
2989 per Mika Lindqvist's suggestion.
2990 * GetNetworkInterfaceInfos() no longer returns results for interfaces
2991 that are not currently up/enabled.
2992 * SharedFilterSessionFactory::CreateSession() now assumes that any
2993 connection coming in over the Loopback device is a local connection,
2994 even if the source IP address isn't recognized as a local address
2995 (a situation that can happen on a Mac when an interface has been
2996 disabled)
2997 * Fixed a bug in AbstractMessageIOGateway::ExecuteSynchronousMessaging()
2998 that would cause it to sometimes return B_ERROR even when it had, in
2999 fact, successfully completed.
3000 * In MUSCLE_USE_IPV6 mode, IsIPv4Address() no longer returns true for
3001 IPv4 addresses ::1 and ::, as these are commonly used IPv6 addresses.
3002 * Fixed two bugs that could cause StorageReflectSession do do subscription
3003 updating incorrectly when using QueryFilters in the subscriptions.
3004
3005 4.63 Released 7/17/2009
3006 - When compiled with MUSCLE_USE_IPV6 enabled, MUSCLE now does automatic
3007 transparent remapping of IPv4-compatible IPv6 addresses into IPv4-mapped
3008 IPv6 addresses. This allows MUSCLE servers to be 100% compatible with
3009 both IPv4 and IPv6 clients (on platforms that support dual stacks, of
3010 course) without any additional effort on the programemr's part.
3011 - Added SetAutomaticIPv4AddressMappingEnabled() and
3012 GetAutomaticIPv4AddressMappingEnabled() calls to
3013 NetworkUtilityFunctions.{cpp,h}.
3014 - Added CAdd*() and CPrepend*() convenience methods to the Message
3015 API, to the common "add value to Message unless it's the default value"
3016 idiom quicker and easier to express.
3017 - Added Contains() convenience methods to the String class.
3018 - Added an optional (optRetTotal) argument to
3019 SharedUsageLimitProxyMemoryAllocator::GetCurrentMemoryUsage().
3020 - Added a ParseHumanReadableTimeIntervalString() convenience function
3021 to MiscUtilityFunctions.cpp.
3022 - Added an static Exists() method to the Directory class.
3023 - Added a PutOrRemove() convenience method to the Hashtable class.
3024 - Added an IsValidIP() function to NetworkUtilityFunctions.{cpp,h}.
3025 - GetNextEventFromInternalThread() now has an optLocation parameter that
3026 can be used to find out the IP address and port that a session connected
3027 to (or what accepted from).
3028 - The SessionConnected() signals of the QMessageTransceiverThread and
3029 QMessageTransceiverHandler classes now include an IPAddressAndPort object
3030 indicating what the session connected to.
3031 - The SessionAccepted() signal of the QMessageTransceiverThread class now
3032 includes an IPAddressAndPort object indicating where the session was accepted from.
3033 - Added SetAsyncConnectDestination() and GetAsyncConnectDestination() methods
3034 to the AbstractReflectSession class.
3035 - Added ToString() methods to the SegmentedStringMatcher and
3036 StringMatcher classes.
3037 - SegmentedStringMatcher no longer bothers to allocate a StringMatcher
3038 object for clauses that are represented by "*".
3039 o Renamed DataNode::CountChildren() to DataNode::GetNumChildren().
3040 o Renamed DataNode::SetMaxKnownChildID() to DataNode::SetMaxKnownChildIDHint().
3041 o Renamed Message::CountNames() to Message::GetNumNames().
3042 o Rewrote the static internal function AdjustValue() in
3043 SharedUsageLimitAllocator.cpp to give more informative error output.
3044 o Removed Message::GetConstPointer() since you can use GetPointer()
3045 to do the same thing (by assigning a const pointer to the result).
3046 o Documented some methods that were previously not documented.
3047 * Fixed a bug where SharedUsageLimitAllocator::ResetDaemonCounter()
3048 could push the cumulative memory counter into negative territory.
3049 * Inet_NtoA was allowing the IPv6-specific "@3" interface-index
3050 suffix into IPv4-style address strings. Fixed.
3051 * SetupSystem.cpp's Muscle_GetCurrentThread() wasn't working properly
3052 on 64-bit OS's. Fixed.
3053
3054 4.62 Released 6/17/2009
3055 - Added a ThreadLocalStorage class to the muscle/system
3056 sub-folder. This class makes it easy for each thread
3057 to access its own local copy of a global object, without
3058 any need for Mutex locking/unlocking overhead.
3059 - Added a Thread::GetCurrentThread() static method, so that
3060 any Thread can access its Thread object conveniently.
3061 - Added additional fields to the PR_RESULT_PARAMETERS Message:
3062 PR_NAME_SERVER_CURRENTTIMEUTC (server's GetCurrentTime(UTC))
3063 PR_NAME_SERVER_CURRENTTIMELOCAL (server's GetCurrentTime(LOCAL))
3064 PR_NAME_SERVER_RUNTIME (server's GetRunTime64())
3065 - Added a AddApplicationSpecificParametersToParametersResultMessage()
3066 method to the StorageReflectSession class. It allows a subclass
3067 to add fields to the PR_RESULT_PARAMETERS Message before it
3068 goes back to the client.
3069 - Added an IsIPv4Address() function to NetworkUtilityFunctions.{cpp,h}
3070 - Added GetSendDestinations() methods to the UDPSocketDataIO object.
3071 With these methods you can have the UDPSocketDataIO object send the
3072 same UDP packet to multiple destinations whenever Write() is called.
3073 - Added a GetDefaultItem() method to the Queue class.
3074 - Added GetDefaultKey() and GetDefaultValue() methods to the
3075 Hashtable class.
3076 - If TARGET_PLATFORM_XENOMAI is defined, GetRunTime64() now
3077 uses Xenomai's rt_timer_read() function to determine its result.
3078 - GetNetworkInterfaceInfos() and GetNetworkInterfaceAddresses() now
3079 accept a bit-chord of GNII_INCLUDE_* bits as their second argument,
3080 rather than a simple boolean. This allows the caller to express
3081 in a bit more detail which sorts of interfaces he is interested in.
3082 - Added a convenience constructor to the AndOrQueryFilter class.
3083 o Added testthread.cpp back in to the test/Makefile.
3084 o Modified testthread.cpp to test the ThreadLocalStorage class also.
3085 o Reorganized the ObjectPool.h class implementation.
3086 o Simplified the Qt implementation of the Thread class.
3087 * system/Mutex.h now #includes support/MuscleSupport.h,
3088 so that the Win32 build environment is detected properly
3089 even when system/Mutex.h is the first #include.
3090
3091 4.61 Released 5/22/2009
3092 - Added GetTotalNumSignalsReceived() and
3093 GetNumSignalsReceivedOfType() methods to the
3094 SignalMultiplexer class.
3095 - Added an IsCurrentThreadMainThread() function to
3096 SetupSystem.{cpp,h}.
3097 - Added support for a "catchsignals" keyword to
3098 HandleStandardDaemonArgs(). This keyword, if
3099 specified, will cause the main thread's
3100 ReflectSession() (if any) to add a signal handler
3101 session to itself.
3102 - Added support for a MUSCLE_AVOID_SIGNAL_HANDLING compiler
3103 flag that can be defined by applications that don't
3104 want to compile in signal handling support.
3105 - Added a SignalChildProcess() method to the
3106 ChildProcessDataIO class.
3107 - ChildProcessDataIO::WaitForChildProcessToExit()
3108 now takes an optional timeout value, and returns
3109 true if the child exited or false if it timed out.
3110 - In the ChildProcessDataIO class, I replaced
3111 SetKillChildOnClose() and SetWaitForChildOnClose() with
3112 a single SetChildProcessShutdownBehavior() method which
3113 provides for more flexibility, making it possible to
3114 do a "soft shutdown with a hard kill after a timeout".
3115 o Removed the "catchsignals" support from muscledMain()'s
3116 setup code, since that support is now part of
3117 HandleStandardDaemonArgs() instead.
3118
3119 4.60 Released 5/15/2009
3120 - The Message class now derives from Cloneable.
3121 - The Message::FindInt*() methods class now accept both
3122 signed and unsigned value arguments, so that dangerous
3123 C-style casting is no longer necessary when retrieving
3124 unsigned integer values.
3125 - Added a set of Message::Get*() methods that are similar to
3126 Message::Find*() except that they return the found value
3127 instead of a status code. (if the requested value is not found,
3128 they return a user-provided default value instead)
3129 - The Message::Find*() methods now take their value parameters
3130 by reference instead of by pointer.
3131 (e.g. msg.FindInt8("foo", x) instead of msg.FindInt8("foo", &x).
3132 The old by-pointer style is still supported, but is deprecated.
3133 - Added a Queue::LastIndexOf() method that does a reverse
3134 search in a Queue, optionally within a specified index range.
3135 - Added a Flattenable::UnflattenFromByteBuffer() method
3136 that takes a ConstByteBufferRef argument, per Mika's request.
3137 - Added SetLowBits(), SetHighBits() to the IPv6 ip_address class.
3138 - When MUSCLE_USE_IPV6 is defined, the ip_address class now
3139 includes an interface-address field. Inet_AtoN() and Inet_NtoA()
3140 now append/expect this field at the end of the string if the
3141 interface is non-zero (e.g. "fe80::1@3")
3142 - Upgraded the multicast API to properly support IPv6 multicast.
3143 In particular, when MUSCLE_USE_IPV6 is defined,
3144 AddSocketToMulticastGroup() and RemoveSocketFromMulticastGroup()
3145 no longer take an interface IP address (instead they use the
3146 interface index included in the groupAddress argument).
3147 Also SetSocketMulticastSendInterfaceAddress() and
3148 GetSocketMulticastSendInterfaceAddress() are replaced by
3149 SetSocketMulticastSendInterfaceIndex() and
3150 GetSocketMulticastSendInterfaceIndex(). This is necessary
3151 because IPv6 doesn't identify interfaces by IP address,
3152 rather it identifies them with integers.
3153 - Added a broadcastIP_IPv4 constant to NetworkUtilityFunctions.h
3154 to allow IPv4 braodcasts even in IPv6 mode.
3155 - Added a localhostIP_IPv4 constant to NetworkUtilityFunctions.h
3156 to allow references to the IPv4 localhost device in IPv6 mode.
3157 - Added a GetHashCodeForIPAddress() function to
3158 NetworkUtilityFunctions.h, to avoid #ifdefs in application code.
3159 - Added a IsMulticastIPAddress(const ip_address &) function
3160 to NetworkUtilityFunctions.{cpp,h} that returns true iff the
3161 specified address is a multicast addess.
3162 - Added a IsStandardLoopbackDeviceAddress(const ip_address &)
3163 function to NetworkUtilityFunctions.h, since under IPv6
3164 localhostIP has several names and thus doing a literal
3165 numeric comparison to (localhostIP) can be error-prone.
3166 - Added a GetConnectString(const String &, uint16) convenience
3167 function to MiscUtilityFunctions.{cpp,h}, to generate strings
3168 like "localhost:9999" or "[ff05::1]:9999" correctly.
3169 - Added an ExecuteSynchronousMessageRPCCall() function to
3170 MessageIOGateway.{cpp,h}. This function connects to a
3171 server via TCP, sends a Message, received a Message,
3172 and returns the received Message, so that you can "call"
3173 a server, RPC-style, as if it was a local function.
3174 - Added a GetLocalHostName() function to
3175 NetworkUtilifyFunctions.{cpp,h}.
3176 - Added a HashCode64() method to the String class, and a
3177 CStringHashFunc64() function that it calls.
3178 - Added a ToString() method to the NetworkInterfaceInfo class.
3179 - Improved the parsing of IPAddressAndPort and ParseConnectArg()
3180 so that they now properly handle IPv6 hostname-and-port
3181 strings that don't contain brackets, when possible.
3182 - Added a version of ParseConnectArg() that takes a direct
3183 String (instead of a Message and field name)
3184 - Rewrite the Win32 implementation of GetNetworkInterfaceInfos()
3185 to use GetAdaptersAddresses() instead of GetIpAddrTable(),
3186 so that it can detect IPv6 addresses as well as IPv4.
3187 - Added an optional (preferIPv4Style) argument to Inet_NtoA()
3188 so that if you prefer, IPv4 addresses can be returned in the
3189 classic style ("192.168.1.1") instead of new-style ("::192.168.1.1")
3190 - Added support for the MUSCLE_INCLUDE_SOURCE_LOCATION_IN_LOGTIME
3191 compiler flag, which if specified will cause every call to
3192 LogTime() to include location info (source file name and line
3193 number) in the log information. This can be useful for
3194 tracking down exactly where a particular log message came from.
3195 - When MUSCLE_INCLUDE_LOCATION_IN_LOGTIME is defined, the
3196 standard log-line preamble now includes the string returned
3197 by GetStandardLogLinePreamble().
3198 - Added GenerateSourceCodeLocationKey(),
3199 SourceCodeLocationKeyToString(), and
3200 SourceCodeLocationKeyFromString() functions to Syslog.{cpp,h}
3201 - Added a utility called "findsourcelocations" to the tests folder.
3202 This utility will find possible locations for source code keys
3203 in the specified directory hierarchy.
3204 - Added a HashCode() method to the NetworkInterfaceInfo class.
3205 - The Directory class is now a subclass of RefCountable.
3206 - Added a GetPath() method to the Directory class.
3207 - Added FileExists(), RenameFile(), CopyFile(), and DeleteFile()
3208 utility functions to util/MiscUtilityFunctions.{cpp,h}.
3209 - Added an MEXIT(ret,msg) macro to MuscleSupport.h. It's
3210 the same as MCRASH, but it doesn't crash, it merely ends
3211 the process (by calling ExitWithoutCleanup(ret)).
3212 - Added a Reset() method to the StringMatcher class.
3213 - Added a WasConnected() method to AbstractReflectSession,
3214 so that subclasses can find out if the session ever was
3215 connected to its remote peer.
3216 - ExpandLocalhostAddress() now caches its first result from
3217 GetNetworkInterfaceInfos() so that it no longer has to
3218 call GetNetworkInterfaceInfos() every time it is called.
3219 - Added a GetServerSessionID() method to the ReflectServer
3220 class, and a PR_NAME_SERVER_SESSION_ID field to the
3221 standard parameters set, so that clients can access a
3222 64-bit value that is unique to the current server instance.
3223 - Added a SignalMultiplexer class that deals with POSIX
3224 signals or Windows Console signalling in a unified manner.
3225 - Added a QSignalHandler class that can emit a Qt signal
3226 when a POSIX/Windows signal is received.
3227 - Added a SignalHandlerSession class that you can add
3228 to your ReflectServer if you want signals to result
3229 in a graceful shutdown (or other custom behavior)
3230 - The Python MessageTransceiverThread class constructor
3231 now takes a boolean argument which indicates whether or
3232 not it should use IPv6 networking.
3233 - Added a GetHumanReadableProgramNameFromArgv0(const char *)
3234 convenience function to MiscUtilityFunctions.{cpp,h}.
3235 - Added a Win32AllocateStdioConsole() function that allocates
3236 a console window for stdio to use under Windows.
3237 - Added CleanupDNSLabel() and CleanupDNSPath() functions to
3238 MiscUtilityFunctions.{cpp,h}. These are handy for removing
3239 errors from user-entered DNS hostnames (e.g. "www.foo.com").
3240 - Rewrote String::LastIndexOf(char) and the String -=
3241 operators to be more efficient.
3242 o The arguments to the Log() method in the LogCallback API
3243 are now consolidated into a single LogCallbackArgs object,
3244 for efficiency and cleaner code.
3245 o The GetStandardLogLinePreamble() function now takes a
3246 single LogCallbackArgs argument instead of separate args also.
3247 o Removed support for the MUSCLE_AVOID_NAMESPACES,
3248 BEGIN_NAMESPACE, END_NAMESPACE, and USING_NAMESPACE
3249 macros, since they aren't necessary and use of macros to
3250 control namespaces can confuse Qt's moc utility.
3251 o Rewrote portablereflectclient to use StdinDataIO instead
3252 of accessing stdin directly. This allows it to work
3253 correctly under Windows, and simplifies the code.
3254 o Queue::IndexOf() was defined as returning the last
3255 matching item, which was inconsistent. Replaced it with
3256 a new IndexOf() implementation that does a forward search,
3257 optionally within a specified index range.
3258 o Suppressed a warning in zip.c
3259 o Removed the explicit signal handling from the ReflectServer
3260 class (SetSignalHandlingEnabled() and WasSignalCaught() are
3261 gone now). This functionality is now handled by the
3262 SignalHandlerSession class instead.
3263 * The Win32 "console" keyword wasn't redirecting stdin. Fixed.
3264 * Fixed a syntax error in the EnsureRefIsPrivate() method.
3265 * Updated the VC++ project files so they build again.
3266 * ParseConnectArg() now handles the "[ipv6::addr]:port"
3267 syntax properly when MUSCLE_USE_IPV6 is defined.
3268 * Fixed a bug in the PulseChild class that would sometimes
3269 prevent the GetPulseTime() method of grandchild PulseChild
3270 nodes from getting called after InvalidatePulseTime() was
3271 called on them.
3272 * AbstractReflectClient::Reconnect() now sets the _wasConnected
3273 flag to false.
3274 * Fixed a bug in MessageTransceiverThread::AddNewWorkerConnectSession()
3275 that was causing disconnect notifications not to be sent for
3276 connect-sessions whose connections failed synchronously.
3277 * IntCompareFunc() was taking an int8 argument by mistake. Fixed.
3278
3279 4.51 Released 3/19/2009
3280 - Added GetByteBufferFromPool() functions that accept a Flattenable
3281 object as an argument, for convenience.
3282 - Added a Message::GetPointerToNormalizedFieldData() method, which
3283 is useful if you need efficient direct (array-style) access to
3284 the contents of a data field in a Message object.
3285 - Added NumericAwareStringCompareFunc() functions to String.{cpp,h}.
3286 These routines are based on Martin Pool's number-aware string
3287 compare code, and compare strings in such a way that numbers in
3288 the strings are sorted properly.
3289 - Added a SegmentedStringMatcher class to the regex folder, for
3290 easy multi-level regex matching in e.g. file paths.
3291 - Added GetStringMatcherFromPool() convenience functions to
3292 regex/StringMatcher.{cpp,h}.
3293 - Added a ParseHexBytes() convenience function to
3294 MiscUtilityFunctions.{cpp,h}
3295 - Added a PrintToStream() method to the ByteBuffer class.
3296 - Added Bryan Varner's UDPClient class to the Java archive.
3297 This class facilitates sending small MUSCLE Messages over UDP
3298 in Java programs. Thanks Bryan!
3299 - Added Bryan Varner's DatagramPacketTransceiver class to the
3300 Java archive. This class allow Java applications
3301 to send large MUSCLE Messages over UDP in Java programs,
3302 by breaking them up into multiple chunks that are sent in
3303 successive UDP packets and then re-assembled by the receiver.
3304 This class is compatible with MUSCLE's C++ PacketTunnelIOGateway
3305 class. Thanks again, Bryan!
3306 - Added LaunchChildProcess() and System() methods to the
3307 ChildProcessDataIO class that takes a Queue<String> as an
3308 argument, for convenience.
3309 - Added implementations of ParseArg(), ParseArgs(), ParseFile(),
3310 and UnparseArgs() that take a Queue<String> to hold the parsed
3311 arguments rather than a Message. This is useful in cases where
3312 argument ordering must be preserved 100%.
3313 - Added a Directory::MakeDirectoryForFile() convenience method.
3314 It creates a directory for the specified file to be created in.
3315 - Added Monni's 64-bit x86 byte-swap routine to MuscleX86SwapInt64().
3316 o RemoveEscapeChars() and EscapeRegexTokens() now take a const
3317 String and return a String. This makes them easier to use
3318 in nested function calls.
3319 o Repackaged the com.lcs.* Java hierarchy as com.meyer.*, to reflect
3320 my company's name change.
3321 o Removed the Visual Cafe project from the archive, as it is obsolete
3322 and I am no longer using Visual Cafe and thus cannot easily update it.
3323 * Fixed template problems with gcc4 in BThread.h and AThread.h
3324 * The Windows implementation of StdinDataIO now freopens stdin
3325 as "nul", so that no other code will try to access stdin. This
3326 was done to keep third party libraries (read: Python 2.6) from
3327 trying to muck with stdin while the StdinDataIO thread was using
3328 and getting hung up.
3329
3330 4.50 Released 1/28/2009
3331 - NullDataIO's constructor now takes an optional ConstSocketRef
3332 argument, to let you specify the value that its GetSelectSocket()
3333 method should return.
3334 - Added a GetMessageFromPool(const ByteBuffer &) inline
3335 convenience function.
3336 - Added another AddNewSession() convenience method to the
3337 MessageTransceiverThread class.
3338 - In the Message class, MoveName(), CopyName(), and ShareName()
3339 all now take an optional target-field-name parameter, in case
3340 you want to have a different field name in the target Message.
3341 - Added an EnsureFieldIsPrivate(const String & fieldName) method
3342 to the Message class. This method is useful to avoid side effects
3343 when modifying possibly-shared Message fields' contents.
3344 - Added an "cleanup callbacks queue" to the CompleteSetupSystem
3345 class, so that you can specify actions that should be taken as
3346 part of the CompleteSetupSystem destructor's cleanup steps.
3347 - Added a static GetCurrentCompleteSetupSystem() method to the
3348 CompleteSetupSystem class, to make it easier for code to find
3349 the current CompleteSetupSystem object.
3350 - Added MUSCLE_CATCH_SIGNALS_BY_DEFAULT #ifdefs... if this
3351 is set, ReflectServer will enable Control-C detection (and
3352 graceful shutdowns) by default.
3353 - GetOSName() now accepts an optional string value to return in
3354 the case where it can't determine the local OS name.
3355 - Added a MUSCLE_UNIQUE_NAME macro to MuscleSupport.h which will
3356 evaluate to a unique identifier based on the line number that the
3357 macro is invoked on.
3358 - Added a DECLARE_ANONYMOUS_STACK_OBJECT macro to MuscleSupport.h
3359 to allow easy declaration of anonymous objects on the stack.
3360 - Added util/BatchOperator.h, which contains the BatchOperator
3361 and BatchOperatorGuard utility classes that help automate the
3362 amortization of setup/shutdown routines across a nested call
3363 tree, for more efficient batch processing.
3364 - Added a DECLARE_BATCHGUARD() macro for each declaration of
3365 batched areas of code.
3366 - Added a DECLARE_MUTEXGUARD(m) macro to support declaring an
3367 anonymous MutexGuard on the stack in a simple and foolproof way.
3368 - hexterm now automatically enables the UDP broadcast flag on its
3369 UDP socket when the specified UDP address is a broadcast address.
3370 - Added a Cloneable interface in util/Cloneable.h, and updated
3371 ConstRefCount::EnsureRefIsPrivate() to use it when appopriate.
3372 - Added a Clone() method to the ConstRefCount class, for easy
3373 copying of referenced items.
3374 - Redesigned hexterm to be Win32 compatible.
3375 - Added a hexterm.vcproj file to the tests folder, to compile
3376 hexterm under Win32/VC++.
3377 - Added a "child=" option to hexterm so it can spawn and communicate
3378 with a child process if you want it to.
3379 - Added a "ascii" keyword argument to hexterm so you can send
3380 and receive data in ASCII format rather than hex, if you prefer.
3381 - Added LogHexBytes() functions to MiscUtilityFunctions.h. These
3382 are the same as PrintHexBytes() except that they call through
3383 to Log() instead of directly to fprintf().
3384 - Added an optional (portRequired) argument to ParseConnectArg().
3385 - Added SetLogFileName()/GetLogFileName() to util/SysLog.{cpp,h}.
3386 - Added a standard "logfile" keyword so you can specify the name
3387 and/or location of a log file to write the log to.
3388 - Added a WaitForChildProcessToExit() method to the
3389 ChildProcessDataIO class.
3390 - Added ChildProcessDataIO::System() static convenience methods.
3391 - Added a Directory::DeleteDirectory() static convenience method.
3392 o Rolled in Mika Lindqvist's Haiku-compatibility patches.
3393 o Renamed the standard "log" and "display" keywords to "filelevel"
3394 and "displaylevel", respectively.
3395 o Removed the OutOfMemoryCallback and FunctionOutOfMemoryCallback
3396 classes and replaced them with more general-purpose
3397 GenericCallback and FunctionGenericCallback classes.
3398 o Tweaked a call to FD_ISSET() in system/Thread.cpp in order to
3399 avoid a compiler warning under g++ 4.3.1
3400 o Tweaked the _PLOCKimp and _PUNLOCKimp debug functions to compile
3401 properly in 64-bit environments.
3402 o Updated the Message.h Doxygen documentation with some more
3403 descriptive parameter names.
3404 o hexterm no longer disables multicast-to-self when sending
3405 multicast UDP packets.
3406 o Removed DebugTimer.cpp; that code has moved to SetupSystem.cpp.
3407 o Updated all copyright notice headers to read 2000-2009 Meyer Sound.
3408 * DebugTimer now uses GetRunTime64() if MUSCLE_USE_LIBRT is defined.
3409 * Fixed some #ifdef problems involving the stat64() call in
3410 FilePathInfo.h. FilePathInfo.h should now compile under both
3411 32-bit and 64-bit environments.
3412 * JeffK added a macosx.mak file to the muscle/zlib/zlib folder,
3413 to support creation of universal binaries that include zlib.
3414 * MuscleSupport.h now checks a much more exhaustive list of
3415 Intel-compatible processor-type macros before deciding that
3416 inline x86 assembly code is not an option. In particular,
3417 compiling with an __i686__ target now does the right thing.
3418 * Fixed a potential infinite recursion in
3419 Thread::WaitForNextMessageAux().
3420 * Tweaked the SharedMemory.h include directives to compile
3421 more reliably under Win32.
3422 * Updated the #ifdefs in MuscleSupport.h to define int64's
3423 and uint64's properly under 64-bit Ubuntu Linux.
3424 * Rewrote the Win32 implementation of StdinDataIO to be simpler
3425 and more reliable.
3426 * The Win32 implementation of the INT64_FORMAT_SPEC macros
3427 was incorrect. Fixed it to do the right thing.
3428 * Made ChildProcessDataIO::LaunchChildProcess() const-correct.
3429 * ChildProcessDataIO::LaunchChildProcess() now specifies the
3430 application name to launch, when possible, for better security.
3431 (See Microsoft's CreateProcess() man page for details)
3432
3433 4.41 Released 11/17/2008
3434 - Added an implementation of PrintHexBytes() that takes a
3435 Queue<uint8> as an argument.
3436 - Added GetArchiveMessageFromPool() functions to Message.{cpp,h}.
3437 These templated convenience functions let you convert any object
3438 (with a SaveToArchive() method) into a MessageRef with a single command.
3439 - Added FindArchiveMessage() and FindArchiveMessageWithDefault()
3440 template methods to the Message class, for convenient one-step
3441 restoring of archived objects.
3442 - Added AddArchiveMessage(), PrependArchiveMessage(), and
3443 ReplaceArchiveMessage() template methods to the Message class,
3444 for further convenience in archiving objects.
3445 - GetHumanReadableTimeValues() now writes into a
3446 HumanReadableTimeValues object instead of into a series
3447 of by-reference int parameters. The HumanReadableTimeValues
3448 object now also includes day-of-week and microsecond fields.
3449 - Added an ExpandTokens() method to the HumanReadableTimeValues
3450 class that makes it easy to generate time/date stamps of your
3451 preferred format using various printf()-style field specifiers.
3452 * ProxySessionFactory::IsReadyToAcceptSessions() wasn't passing
3453 the call onto the slave session like it was supposed to. Fixed.
3454 * The calls to open() inside SpawnDaemonProcess() now supply a
3455 mode argument to the open() call.
3456 * AcceptSocketsThread.cpp wasn't compiling due to a const/non-const
3457 issue. Fixed.
3458 * Fixed several bugs in the admin utility. Thanks to Monni for
3459 pointing them out and supplying a patch.
3460
3461 4.40 Released 10/16/2008
3462 - The Ref class now subclasses from a ConstRef class, which is the
3463 same as Ref except that it only allows read-only access to the
3464 held RefCountable object.
3465 - Added a CastAwayConstFromRef() template function to RefCount.h,
3466 so you can easily convert a ConstRef to a Ref if you really need to.
3467 - Renamed the SocketRef class to ConstSocketRef, because it now derives
3468 from ConstRef<Socket> instead of Ref<Socket>.
3469 - Added a DECLARE_REFTYPES macro to RefCount.h, which you can
3470 use to declare the standard BlahRef and ConstBlahRef typedefs
3471 without having to specify the typedefs manually every time.
3472 - Added implementations of the Connect() and ConnectAsync() functions
3473 that take an IPAddressAndPort object as an argument.
3474 - Added *_FORMAT_SPEC_NOPERCENT macros, for times when I need to
3475 specify format specifications without the percent sign included.
3476 - Added an AsyncDataIO class that can be used to transparently forward
3477 I/O operations to a separate thread, to avoid blocking in your
3478 main thread. This can be useful for DataIO classes that don't
3479 support non-blocking I/O (e.g. FileDataIO)
3480 - Added a GetStackTrace() function to SysLog.{cpp,h} that returns
3481 the current stack trace as a String.
3482 - Added GetLightweightCopyOfMessage() convenience functions to
3483 Message.{cpp,h}.
3484 - Added convenience methods FindFirstSessionOfType() and
3485 FindSessionsOfType() to the ServerComponent class. These
3486 methods are templated to let you quickly find and collect
3487 one or more atatched session objects of the specified C++ class.
3488 o Renamed GenericRef to RefCountableRef, for consistency.
3489 o Renamed PolicyRef to AbstractSessionIOPolicyRef, for consistency.
3490 o Renamed Ref::SetFromGeneric() and Ref::GetGeneric() to
3491 Ref::SetFromRefCountableRef() and Ref::GetRefCountableRef(),
3492 respectively, for consistency.
3493 o testrefcount now runs a 10-second test of reference-counts in a
3494 heavily multithreaded environment, to ensure that they are thread safe.
3495 o Improved performance of Tuple::ShiftValuesLeft() and
3496 Tuple::ShiftValuesRight().
3497 * Removed re-definitions of 'true' and 'false' when compiling in C++ mode.
3498 * Added some missing command codes to StorageReflectConstants.py.
3499 * Message.py didn't handle B_INT32_TYPE fields properly when running on
3500 a 64-bit host. Fixed.
3501 * AddNewConnectSession() and Reconnect() now handle synchronous connect
3502 failures the same way as asynchronous connect failures, so that the
3503 calling code doesn't have to worry about two different failure modes.
3504 * Fixed a valgrind hit in CreateAcceptingSocket() on 64-bit platforms.
3505 * Fixed a buffer overflow bug in Message::AddToString().
3506 * Updated the header comments to fix various doxygen warnings.
3507
3508 4.30 Released 9/18/2008
3509 *** WARNING - THIS RELEASE CHANGES THE PulseNode API IN a NON ***
3510 *** BACKWARDS COMPATIBLE WAY. BE SURE TO READ THE ENTRY ABOUT ***
3511 *** PulseNode BELOW AND UPDATE YOUR CODE TO MATCH THE NEW API. ***
3512 - ChildProcessDataIO class now has SetChildProcessInheritFileDescriptors()
3513 and GetChildProcessInheritFileDescriptors() methods to control whether
3514 child processes spawned should inherit the parent's file descriptors or
3515 not. Note that these methods have no effect under Windows.
3516 - When receiving UDP packets, hexterm now prints out the source of the
3517 UDP packets it received (in addition to the data).
3518 - Added a IsNormalized() method to the Queue class.
3519 - Added a IsMessageDeflated() method to ZLibUtilityFunctions.h.
3520 - Added Message::BecomeLightWeightCopyOf(const Message &), for making
3521 lightweight copies of Messages, with shared fields.
3522 - Added Message::ShareName() (like CopyName() except the data isn't
3523 copied, rather only a reference is shared)
3524 - Added Queue::AddHeadAndGet() and Queue::AddTailAndGet() methods,
3525 for when you want to add an item to a Queue and then write to the
3526 added object directly afterwards.
3527 - Added an optional (retPort) argument to
3528 MessageTransceiverThread::PutAcceptFactory() so that you can now
3529 use dynamic port assignment with it.
3530 o PulseNode::GetPulseTime() and PulseNode::Pulse() now take a single
3531 (const PulseArgs &) argument instead of two uint64s. This makes
3532 implementing the PulseNode interface less verbose, and calling
3533 the Pulse callbacks more efficient. However, this breaks compatibility
3534 with earlier code that expects (uint64, uint64) arguments for those
3535 methods, so be sure to update your code when upgrading to this
3536 version of MUSCLE.
3537 o Fixed some compiler warnings under gcc (thanks to Monni for pointing
3538 these out)
3539 o Trying to use MUSCLE's logging system when there is not a SetupSystem
3540 object on the stack (e.g. before or after main()) is no longer a fatal error.
3541 Instead, muscle will degrade to output only to the built-in log services
3542 (stdout and/or output-to-file) when called under these conditions.
3543
3544 4.28 Released 8/26/2008
3545 - Added a RefCount::IsDeeplyEqualTo() method for more in-depth
3546 comparison-by-value of the referenced items. (The regular RefCount::==
3547 operator only compares the pointers, not the items themselves)
3548 - Added a Directory class (util/Directory.{cpp,h}) to support directory
3549 scanning in a cross-platform-compatible fashion.
3550 - Added a FilePathInfo class (util/FilePathInfo.h) to support
3551 stat() functionality in a cross-platform-compatible manner.
3552 - ReflectServer::SetSignalHandlingEnabled() now enables/disables
3553 handling of console signal events (Ctrl-C, etc) under Win32.
3554 - Added implementations of GetMessageFromPool() that take a
3555 pointer and a byte-count and try to return a Message that has
3556 been unflattened from the specified byte array.
3557 - ChildProcessDataIO::LaunchChildProcess() now takes an optional
3558 boolean (usePty) argument that allows you to specify at runtime
3559 whether you want to use fork() or forkpty() to launch the child
3560 process.
3561 - Added a MUSCLE_AVOID_FORKPTY compiler flag that tells the
3562 ChildProcessDataIO class to avoid compiling in calls forkpty().
3563 o Made the AbstractReflectSession::EndSession() method virtual.
3564 o The Win32 build of MUSCLE now #includes winsock2.h instead of winsock.h.
3565 * The Win32 implementation of StdinDataIO wasn't handling a closed
3566 stdin connection correctly. Fixed.
3567 * For the Win32 build, added Microsoft's recommended work-around for
3568 the WSAECONNRESET problem with UDP sockets, as described at
3569 http://support.microsoft.com/kb/263823/en-us
3570 * Fixed the Hashtable and Queue classes to again compile under
3571 Visual C++ 6.0 (thanks to Mika Lindqvist for the patch)
3572
3573 4.27 Released 7/24/2008
3574 - minichatclient.c now advertises the client's host OS on the server.
3575 - PrintStackTrace() is now implemented under MacOS/X (Leopard or newer).
3576 - PrintStackTrace() and all implementations of PrintToStream()
3577 now take an optional (FILE *) argument, so that they can now
3578 print to places other than stdout if you prefer.
3579 - The testchildprocess test program now has you specify the number
3580 of child process instances to run. That makes it easier to test
3581 what happens when many child processes are launched in parallel.
3582 o Merged in some more of Mika Lindqvist's Haiku compatibility tweaks.
3583 o Hashtable::GetByDefault() with one parameter now returns its result
3584 by reference instead of by value.
3585 o The Hashtable and Queue classes now keep default instances of
3586 their user types, to avoid having to construct temporary default
3587 objects when resetting objects to their default state.
3588 * PrintStackTrace() now prints appropriate error messages if
3589 it fails, instead of just failing siliently.
3590 * Fixed a syntax error in Hashtable::Remove(const Hashtable &)
3591 * Hashtable::Clear() now handles re-entrancy (from the templatized
3592 classes' assignment operators) correctly.
3593
3594 4.26 Released 6/5/2008
3595 - Added a CheckedGetItemPointer() method to the Ref class.
3596 This method is the same as GetItemPointer(), but with
3597 an additional check so that it will safely return NULL
3598 if the "this" pointer is NULL.
3599 - Added a "assumeDefaultValue" argument to the NumericQueryFilter,
3600 StringQueryFilter, and RawDataQueryFilter classes. This
3601 argument lets you specify that in the event that a Message
3602 doesn't contain the data item the QueryFilter wants to
3603 compare against, a default value should be compared against
3604 instead.
3605 - Added a HashCode() method to the Ref class, for consistency.
3606 - ChildProcessDataIO::GetChildProcessID() is now implemented
3607 under Windows as well.
3608 - Added two new conditional defines to MuscleSupport.h:
3609 MUSCLE_USING_OLD_MICROSOFT_COMPILER, which is defined when
3610 compiling under VC++6 or earlier, and
3611 MUSCLE_USING_NEW_MICROSOFT_COMPILER, which is defined
3612 when compiling under VC++.net(2003) or later. These make
3613 managing Microsoft's bug circus a bit a easier.
3614 * Fixed the Ref class to compile under MSVC2005 again.
3615 * Fixed the setsockopt()/getsockopt() calls in NetworkUtilityFunctions.cpp
3616 so that they again compile under Windows.
3617 * Merged in Mika Lindqvist's patches so that muscle compiles
3618 properly under Haiku.
3619
3620 4.25 Released 5/14/2008
3621 - Added a DECLARE_HASHTABLE_KEY_CLASS macro that expands
3622 to the boilerplate template code necessary to use the
3623 specified class as a key in a Hashtable.
3624 - Added a DECLARE_HASHTABLE_KEY_CLASS_IN_NAMESPACE macro
3625 which is the same as DECLARE_HASHTABLE_KEY_CLASS except
3626 it works from within namespaces other than muscle.
3627 - Added PutIfNotAlreadyPresent() convenience methods to the
3628 Hashtable class.
3629 - Added CopyFrom() method to the Queue and Hashtable classes.
3630 These work the same as the assignment operator, except that
3631 they return a status_t result code.
3632 - Added a SetFilter() method to the PathMatcherEntry class.
3633 o Cleaned up the setsockopt() and getsockopt() calls inside
3634 NetworkUtilityFunctions.cpp to be more portable.
3635 * ExplandLocalhostAddress() is now more careful not to expand
3636 (localhostIP) back into (localhostIP), even if that is the
3637 first IP address listed in the interfaces list.
3638 * Fixed a bug in the QueryFilter subscriptions feature --
3639 after replacing a subscription's existing QueryFilter,
3640 the old QueryFilter would continue to be used instead
3641 of the new one.
3642
3643 4.24 Released 4/28/2008
3644 - If MUSCLE_USE_LIBRT and _POSIX_MONOTONIC_CLOCK are defined,
3645 GetRunTime64() and Snooze64() will now use librt's high-resolution
3646 functions (clock_gettime() and clock_nanosleep()) instead of
3647 the older vanilla POSIX functions. This can provides higher
3648 resolution timing on platforms that support librt.
3649 - Added a new ExecuteSynchronousMessaging() virtual method
3650 to the AbstractMessageIOGateway class, and some associated
3651 hook/callback methods. This method lets you easily do
3652 synchronous/RPC-style "function calls" across the gateway's
3653 socket, passing in one or more Message objects as the
3654 "arguments", and receiving one or more Messages as "results".
3655 - MessageIOGateway now overrides ExecuteSynchronousMessaging(),
3656 IsStillWaitingForSynchronizedReply(), and
3657 SynchronousMessageReceivedFromGateway() so that when you
3658 call ExecuteSynchronousMessaging() on it you will get
3659 proper RPC function-call semantics.
3660 - Added an IsReadyToAcceptSessions() virtual method to the
3661 AbstractReflectSessionFactory class. Subclasses can override
3662 this method to return false if they don't want to accept
3663 any more connections for a while.
3664 - Added an IsConnected() method to the AbstractReflectSession
3665 class, to make it easier to check if a given session is
3666 currently connected to anything or not.
3667 - Added an XorDataIO class to the dataio folder.
3668 XorDataIO XOR's all the data going through it, before
3669 forwarding the method call to its held child DataIO object.
3670 - Added a MutexGuard class that you can put on the stack
3671 to automatically lock/unlock a Mutex via its ctor/dtor.
3672 - Added versions of ReadZipFile() and WriteZipFile() that
3673 take a DataIO reference instead of a file name. That way
3674 you can read zip files over the network, through custom
3675 filters, and so on, if you want to.
3676 zlib/ZipFileUtilityFunctions.{cpp,h}.
3677 - ReadZipFile() now has an optional second argument called
3678 (loadData). Setting it false will cause ReadZipFile to
3679 only read in the file names and uncompressed file lengths,
3680 but not actually read or uncompress the file data. This
3681 is useful if you just want to quickly check the zip file's
3682 contents without actually unpacking everything.
3683 - Updated testzip.cpp to accept an optional "namesonly"
3684 command line argument, which will set (loadData) to
3685 false in its ReadZipFile() call, as described above.
3686 - Added a GetNetworkInterfaceAddresses() function, as an
3687 easier-to-use alternative to GetNetworkInterfaceInfos().
3688 o Made AbstractReflectSession::IsConnectingAsync() public.
3689 o Moved Snooze64() from NetworkUtilityFunctions.cpp to
3690 SetupSystem.cpp, and moved its function declaration from
3691 NetworkUtilityFunctions.h to TimeUtilityFunctions.h.
3692 * Joel Lucsy reported a bug in FlattenToDataIO() that would cause
3693 the last four bytes of the flattened buffer not to be written
3694 to the DataIO object. Fixed.
3695 * Updated zlib's included VC++ project files to reference zconf.h
3696 in its new location (zlib/win32/zconf.h) so that they now work
3697 again.
3698
3699 4.23 Released 3/26/2008
3700 - Added an UnparseArgs() function to MiscUtilityFunctions.{cpp,h}.
3701 This function takes a parsed Message and turns it back into a String.
3702 - Added an InsertItemsAt() method to the Queue class.
3703 - Added an (includeLocalhost) boolean argument to GetNetworkInterfaceInfos().
3704 - Made ServerComponent::SetOwner() and ServerComponent::GetOwner()
3705 public, as it is necessary for classes other than ReflectServer
3706 to access that value in order to properly support the facade
3707 pattern within ReflectSessionFactory objects.
3708 - Added a ProxySessionFactory class to support facade-style
3709 ReflectSessionFactories better.
3710 - Added an optional ITraversalPruner argument to both
3711 StorageReflectSession::SaveNodeTreeToMessage() and
3712 StorageReflectSession::RestoreNodeTreeFromMessage(). This
3713 argument lets the caller specify a callback argument that
3714 can direct the traversal based on custom logic, if necessary.
3715 o Replaced StorageReflectSession::CloneDataNodeSubtree()'s rather clunky
3716 MessageReplaceFunc and void-pointer filtering mechanism with the nicer
3717 and more powerful ITraversalPruner filtering mechanism.
3718 * Fixed a bug in FilterSessionFactory and SharedFilterSessionFactory
3719 where an assertion failure would occur if the "slave" factory attempted
3720 to call GetSessions(), etc.
3721 * SharedFilterSessionFactory's IP-address checking was broken. Fixed.
3722 * AbstractReflectSession::GetPort() was broken and would always
3723 return 0. Fixed.
3724
3725 v4.22 Released 3/4/2008
3726 - Added an IsDaemonProcess() function that returns true iff
3727 the current process was created via SpawnDaemonProcess()
3728 or BecomeDaemonProcess().
3729 - Added a AssembleBatchMessage() convenience function to
3730 MiscUtilityFunctions.{cpp,h}. It's useful for creating a
3731 PR_COMMAND_BATCH Message from zero or more other Messages.
3732 - The NestCount class will now cause an assertion failure
3733 if Decrement() is called when it is already at zero...
3734 that should never happen in correct code.
3735 - Added an optional (numColumns) argument to the
3736 PrintHexBytes() utility function.
3737 - Added a templatized bit-chord class, support/BitChord.h.
3738 - Added ReadData() and WriteData() functions to
3739 NetworkUtilityFunctions.{cpp,h}. These are the same
3740 as SendData() and ReceiveData(), except that they call
3741 read() and write() instead of send() and recv().
3742 - Replaced the PrintHexBytes() implementation with the
3743 superior one from hexterm.cpp.
3744 - Added a GetWithDefault() convenience method to the
3745 Hashtable class.
3746 o Moved the Win32 version of zconf.h from zlib/zlib to
3747 zlib/zlib/Win32, so that it wouldn't show up in SVN
3748 as modified whenever the configure script modified it.
3749 o Changed the default value of MUSCLE_POOL_SLAB_SIZE to
3750 4 kilobytes, to reduce memory overhead somewhat. This
3751 value coincides nicely with the most common memory page size.
3752 * The POSIX implementation of RS232DataIO was broken, because
3753 it was trying to use SendData() and ReceiveData() on the
3754 serial port's (non-sock) fd. Changed it to call ReadData()
3755 and WriteData() instead.
3756 * Rewrote the Unix implementation of ChildProcessDataIO to
3757 call forkpty() instead of doing everything by hand. This
3758 makes the implementation much simpler and more reliable,
3759 although of course it will only work on systems that have
3760 forkpty() available.
3761 * ChildProcessDataIO now closes any forked file handles in the
3762 child process before calling exec().
3763 * Made the PacketTunnelIOGateway parsing more flexible;
3764 duplicate packets no longer break a logical stream.
3765 * Removed several files from the zlib/zlib folder that are
3766 meant to be generated by the configure script.
3767
3768 v4.21 Released 1/22/2008
3769 - Optimized Hashtable::GetOrPut(), CopyToTable(), MoveToTable(),
3770 Put(), and Remove() to be more efficient.
3771 o Updated the muscle.dox Doxygen file to reflect changes to
3772 newer versions of Doxygen
3773 * Hashtable::Put() and Hashtable::Remove() now do the right
3774 thing if they are passed (*this) as an argument.
3775 * Fixed a nasty bug in the ObjectPool destructor that would
3776 cause it to go into an infinite loop, calling delete on
3777 the same array over and over again.
3778 * Filled in and fixed up the Doxygen comments to the point where
3779 Doxygen no longer gives any warnings when generating the autodocs.
3780 o Updated all copyright notice headers to read 2000-2008 Meyer Sound.
3781
3782 v4.20 Released 12/31/2007
3783 - Added an optional set of multicast networking API calls
3784 to util/NetworkUtilityFunctions.h. Define the constant
3785 MUSCLE_ENABLE_MULTICAST_API to make them available.
3786 - hexterm will now automatically use multicast UDP if you
3787 specify a multicast UDP address as an argument. For example,
3788 ./hexterm udp=239.255.1.2:4001
3789 - Added SetSourceExclusionID() and GetSourceExclusionID()
3790 methods to the PacketTunnelIOGateway class, to enable more
3791 efficient filtering of looped-back broadcast/multicast packets
3792 that you sent out and don't want to see back again.
3793 - Added a ParseHexBytes() function to MiscUtilityFunctions.{cpp,h}
3794 - Under Linux, HandleStandardDaemonArgs() now takes a new argument
3795 "debugcrashes" which will cause a signal handler to be installed
3796 that will catch SIGSEGV, SIGBUS, SIGILL, SIGABRT, and SIGFPE,
3797 and print a stack trace to stdout before exiting.
3798 - Added RemoveFirst() and RemoveLast() convenience methods
3799 to the Hashtable class (handy when using the Hashtable as
3800 a keyed FIFO or LRU)
3801 o Moved the PrintHexBytes() function into system/SetupSystem.cpp
3802 so that you don't have to link in MiscUtilityFunctions.cpp
3803 just to use it.
3804 * Tweaked FinalizeAsyncConnect() to work properly under BeOS.
3805 * Improved the BeOS/BONE detection -- Makefile support no
3806 longer required.
3807
3808 v4.11 Released 12/11/2007
3809 - GetHumanReadableTimeString() and ParseHumanReadableTimeString()
3810 now handle the uint64 value MUSCLE_TIME_NEVER as a special case,
3811 by translating it into the string "(never)" (and back).
3812 - Added a CalculateChecksumForUint64(), CalculateChecksumForFloat(),
3813 and CalculateChecksumForDouble() convenience functions to
3814 MuscleSupport.h
3815 - Added a FindFirstMatchingNode() method to the DataNode class,
3816 which can be used to efficiently look up a descendant node
3817 based on a relative or absolute path, with or without wildcard
3818 matching characters.
3819 - Added a GetRootNode() convenience method to the DataNode class
3820 which returns the root node of the DataNode tree.
3821 - Added SetAllowMiscIncomingData() and GetAllowMiscIncomingData()
3822 methods to the PacketTunnelIOGateway class, so that a UDP socket
3823 controlled by a PacketTunnelIOGateway can optional receive
3824 individual (non-packetized) arbitrary UDP packets as well as
3825 the packetized kind. This mode is disabled by default.
3826 - Added a Normalize() method to the Queue class that can be used
3827 to ensure that the Queue's contents are layed out contiguously
3828 in memory (like a C array).
3829 - Added a AddNewDormantConnectSession() method to the ReflectServer
3830 and ServerComponent classes. This method is the same as
3831 AddNewConnectSession() except that the added session will not
3832 start a TCP connection immediately; instead it will hang out
3833 and wait for you to call Reconnect() on it.
3834 - Added a PrintHexBytes() convenience/debugging function to
3835 MiscUtilityFunctions.h
3836 o Removed the (countFieldOrder) argument from the
3837 Message::CalculateChecksum() method.
3838 o Changed instances of ((uint32)-1) literals to the more proper
3839 MUSCLE_NO_LIMIT constant in a number of places.
3840 o Rewrote StorageReflectSession::GetDataNode() as a simple
3841 inline call-through to FindFirstMatchingNode(), which means
3842 that GetDataNode() now supports wildcard matching.
3843 o GetHumanReadableTimeValues() now returns B_ERROR if you pass
3844 it MUSCLE_TIME_NEVER as a time value (since there is no good
3845 numeric way to represent infinity).
3846 o DataNode::PrintToStream() and Message::PrintToStream()
3847 no longer print this-pointer values in their debug output,
3848 because doing so makes it harder to diff state dumps
3849 from different processes.
3850 o AbstractReflectSession::Reconnect() and SetAutoReconnectDelay()
3851 can now be used in conjunction with sessions that were not
3852 added with AddNewConnectSession() also. In this context, they
3853 will "reconnect" the session by destroying its gateway and
3854 DataIO objects and creating new ones by calling
3855 CreateDefaultSocket() and CreateDataIO().
3856 * system/AcceptSocketsThread.h was missing a necessary #include
3857 line. Thanks to Mika Lindqvist for reporting this.
3858 * Fixed a bug in DataNode::InsertOrderedChild() that could cause
3859 the inserted child's node name not to be unique in some
3860 circumstances.
3861 * DataNode::PutChild() now takes a (const DataNodeRef &) instead
3862 of a (DataNodeRef &).
3863 * Removed the index-order multiplication from most implementations
3864 of CalculateChecksum(), since including an index-multiplier
3865 in the checksum makes it inefficient to update a running
3866 checksum tally when inserting or removing items in the list.
3867 * The Thread class now closes the internal thread's side of
3868 the inter-thread socket connection when the internal thread
3869 hook function exits. That way the main thread can be notified
3870 that the child thread has gone away (the main thread's socket
3871 will select() ready-for-read because of the socket close)
3872
3873 v4.10 Released 10/30/2007
3874 - Added Bryan Varner's MicroMUSCLE port to the archive, in
3875 the new java_j2me folder. MicroMUSCLE is a fork of the
3876 MUSCLE Java code that is compatible with the J2ME edition
3877 of Java being used on modern cell phones, etc. Unlike
3878 the standard MUSCLE Java API, this version doesn't require
3879 Java 1.4.x APIs to be supported.
3880 - Added a GetNumberOfProcessors() function to the SystemInfo.h
3881 API. You can call this to find out how many CPU cores the
3882 computer you are running on has.
3883 - Made LockLog() and UnlockLog() part of the public MUSCLE
3884 syslog API, in case you want to use the log mutex in your
3885 own critical section.
3886 - Added a CalculateChecksum() utility function to MuscleSupport.h
3887 - Added CalculateChecksum() functions to the String, ByteBuffer,
3888 Point, Rect, Message, and DataNode classes. These methods
3889 compute a quick checksum on the object's contents which can
3890 then be used for sanity-checking later on.
3891 - Added a PrintToStream() method to the DataNode class for
3892 quick recursive dumping of database subtrees to stdout.
3893 - Message::PrintToStream() and Message::ToString() now include
3894 the checksum value of the Message.
3895 - Added IsInBatch() and IsOutermost() methods to the NestCount
3896 class, for convenience and code clarity. (Before they were
3897 only present in the NestCountGuard class)
3898 - Added a KillChildProcess() method to the ChildProcessDataIO
3899 class, for times when you need the child process dead right
3900 away but you want to keep the socket to it open (so that it
3901 will error out as if the child process died of its own accord).
3902 - Added IsDescendantOf() and IsAncestorOf() convenience methods
3903 to the DataNode class.
3904 - Added a StringCompareFunc() override to String.h that takes
3905 (const String *)'s as arguments. Useful when you want to
3906 save space in a Hashtable of string-keyed, ref-counted
3907 objects, by changing the key-type to a pointer to a string
3908 that is held in the referenced value-objects.
3909 - Added a Message::FindString() method override that sets a
3910 pointer-to-a-String, so that you can access the underlying
3911 String object without having to copy it.
3912 - Added a ServerComponent::GetSession() override that takes
3913 a uint32 for the session ID argument.
3914 - Added convenience versions of StringMatcher::Match()
3915 and HasRegexTokens() that take a String argument instead
3916 of a (const char *).
3917 - Added a GetEmptyMessageRef() convenience function to
3918 Message.h. It's like GetEmptyMessage() except it returns
3919 a (const MessageRef &) instead of a (const Message &).
3920 - The StdinDataIO class now works as expected under Windows.
3921 In particular, it implements some backstage trickery so that
3922 you can use its GetSelectSocket() return value in select()
3923 even though Windows doesn't support doing that.
3924 o Removed GetBlankMessage() from the StorageReflectSession
3925 API. Use GetEmptyMessageRef() instead.
3926 o DataNode::GetData() now returns a (const MessageRef &)
3927 instead of a MessageRef.
3928 o The GetSessions() method now returns a Hashtable instead
3929 of a HashtableIterator.
3930 o The GetNumSessions() method has been removed; use
3931 GetSessions().GetNumItems() instead.
3932 o The GetFactories() method now returns a Hashtable instead
3933 of a HashtableIterator.
3934 o The GetNumFactories() method has been removed; use
3935 GetFactories().GetNumItems() instead.
3936 o Tweaked some of the code to avoid new warnings in gcc 4.1.x
3937 o The SetDataNode(), FindMatchingSessions(), CloneDataNodeSubtree(),
3938 NotifySubscribersThatIndexNodeChanged(), NodeIndexChanged(),
3939 GetNewDataNode(), and JettisonOutgoingSubtrees() methods
3940 in the StorageReflectSession class not take String arguments
3941 instead of (const char *)
3942 o The InsertOrderedChild(), ReorderChild(), HasChild(),
3943 GetChild(), and RemoveChild() in the DataNode class now all
3944 take String arguments instead of (const char *).
3945 o DataNode::GetPathClause() now returns a (const String *)
3946 instead of a (const char *).
3947 o FilterSessionFactory Put*Pattern() and Remove*Pattern()
3948 methods now take (const String &) arguments instead of
3949 (const char *).
3950 o The StdinDataIO class no longer derives from the
3951 FileDescriptorDataIO class. This way it is possible to
3952 use StdinDataIO under Windows (which doesn't support
3953 file descriptors).
3954 o Moved the StdinDataIO code into its own separate StdinDataIO.cpp
3955 file, to better hide the ugly Windows implementation.
3956 * Fixed a VC++ compatibility issue in ObjectPool.h. Thanks to
3957 Mika Lindqvist for reporting this problem.
3958 * Fixed a bug in AcceptSocketsThread.cpp. Thanks to Mika
3959 Lindqvist for reporting this problem also.
3960 * Fixed a HANDLE leak in the Windows implementation of the
3961 RS232DataIO and ChildProcessDataIO classes.
3962
3963 v4.00 Released 10/03/2007
3964 *** WARNING - THIS RELEASE RATIONALIZES SEVERAL APIS AND THUS ***
3965 *** BREAKS SOURCE COMPATIBILITY WITH MOST OLD CODE. DON'T ***
3966 *** UPGRADE TO THIS RELEASE UNLESS YOU ARE WILLING TO UPDATE ***
3967 *** YOUR CODEBASE TO MATCH. ***
3968 - Added a SanitySetupSystem class to the CompleteSetupSystem
3969 object. SanitySetupSystem just does some very quick tests
3970 on the typedef sizes (int16, int32, etc) and endian-ness
3971 of the compiled code to make sure that the code's build
3972 settings are compatible with the run-time environment.
3973 If any of the tests fail, it prints out a stern error
3974 message and aborts the program.
3975 - Added convenience methods for AddFlat(), PrependFlat(),
3976 FindFlat(), and ReplaceFlat() to the Message class that
3977 take a ByteBufferRef as an argument. That way you can
3978 deal with Messages and ByteBufferRefs without always
3979 having to look up how to cast a ByteBufferRef to a
3980 FlatCountableRef and back.
3981 - Added HasChars() and IsEmpty() convenience methods
3982 to the String class, for consistency with the other
3983 container classes.
3984 - Rewrote the ObjectPool class to do its object allocations
3985 in 8 kilobyte "slabs" rather than one at a time.
3986 This cuts down on the number of calls to new/delete
3987 by an order of magnitude.
3988 - Added a -DMUSCLE_POOL_SLAB_SIZE build option in case
3989 you want the ObjectPools to use a different slab size.
3990 This value is specified in bytes.
3991 - Added an ExitWithoutCleanup() function to
3992 MiscUtilityFunctions.{cpp,h}, which is equivalent to
3993 _exit(). This wrapper function exists because I
3994 suspect _exit() may not be entirely portable.
3995 - Added a "testpool" program to the tests folder to
3996 measure the relative efficiency of various
3997 object-allocation techniques.
3998 - AbstractReflectSession::GetSessionIDString() now returns
3999 a (const String &) instead of a (const char *).
4000 - Added a GetSessionID() accessor to AbstractReflectSession.
4001 - Added a CreateDefaultSocket() method to the
4002 AbstractReflectSession class. This method is called
4003 when AddNewSession() is passed a null SocketRef, and
4004 if implemented to return a non-NULL SocketRef, can be
4005 used to provide a default socket for the session.
4006 - Added a StdinDataIO class that can be used to do
4007 non-blocking-I/O on stdin without breaking the
4008 blocking-I/O functionality of stdout.
4009 o Renamed the SocketHolderRef class to Socket.
4010 o Added the a SocketRef class (which subclasses Ref<Socket>)
4011 o All MUSCLE functions that previously dealt with sockets
4012 as integer file descriptors now use the new SocketRef
4013 type instead. This way there is no chance of leaking or
4014 double-freeing allocated sockets.
4015 o Removed the CloseSocket() function from the API, since
4016 it is no longer necessary.
4017 * Changed the static casts in StorageReflectSession.cpp
4018 to dynamic_cast<>, so that ReflectServers holding some
4019 sessions derived from StorageReflectSession and some
4020 derived directly from AbstractReflectSession will now
4021 work without crashing.
4022 o Removed GetDataIORef() and GetGatewayRef(), and changed
4023 GetDataIO() and GetGateway() to return references to Ref
4024 objects instead of pointers to objects.
4025 o AbstractReflectSession::CreateDataIO() now takes a
4026 (const SocketRef &) argument instead of an int, and now
4027 returns a DataIORef instead of a (DataIO *)
4028 o AbstractReflectSession::CreateGateway() now returns an
4029 AbstractMessageIOGatewayRef instead of a
4030 (AbstractMessageIOGateway *)
4031 o ReflectSessionFactory::CreateSession() now returns an
4032 AbstractReflectSessionRef instead of a (AbstractReflectSession *)
4033 o StorageReflectSession::GetNewDataNode() now returns a
4034 DataNodeRef instead of a (DataNode *). This way any
4035 chance of a memory leak is avoided.
4036 o StorageReflectSession::ReleaseDataNode() has been
4037 removed since it is no longer necessary.
4038 o RefCountable's copy constructor no longer copies the
4039 _manager pointer, since items allocated in one ObjectPool
4040 can no longer be freed by a different ObjectPool.
4041 o MessageTransceiverThread::CreateSupervisorSession() now
4042 returns a ThreadSupervisorSessionRef instead of a
4043 (ThreadSupervisorSession *)
4044 o MessageTransceiverThread::CreateDefaultWorkerSession()
4045 now returns a ThreadWorkerSessionRef instead of a
4046 (AbstractReflectSession *)
4047 o MessageTransceiverThread::CreateDefaultSessionFactory()
4048 now returns a ThreadWorkerSessionFactoryRef() instead of
4049 a (ReflectSessionFactory *).
4050 o ThreadWorkerSessionFactory::CreateThreadWorkerSession()
4051 now returns a ThreadWorkerSessionRef instead of a
4052 (AbstractReflectSessionRef *).
4053 o The MessageTransceiverThread::AddNew*Session() family
4054 of methods now take a (const ThreadWorkerSessionRef &)
4055 argument instead of (const AbstractReflectSessionRef &).
4056 o The MessageTransceiverThread::PutAcceptFactory() family
4057 of methods now take a ThreadWorkerSessionFactoryRef
4058 argument instead of a ReflectSessionFactory.
4059 o MessageTransceiverThread::CreateReflectServer() now
4060 returns a ReflectServerRef instead of a (ReflectServer *).
4061 o The ReflectServer class now derives from RefCountable
4062 and has an associated ReflectServerRef typedef.
4063 o Removed the SetOkayToClose*() methods from the
4064 MessageTransceiverThread class, as they are no longer
4065 necessary.
4066 * BecomeDaemonProcess() now calls ExitWithoutCleanup()
4067 instead of exit(), to avoid crashing the parent process
4068 in the globals-cleanup phase (since the CompleteSetupSystem
4069 object destructor never gets a chance to run).
4070 * Replaced all calls to exit() with calls to
4071 ExitWithoutCleanup().
4072 * Tweaked FileDescriptorDataIO to compile correctly on
4073 64-bit systems.
4074 * Fixed typedefs of int32/uint32 for the PPC64 platform.
4075 * Fixed typedef of muscle_socklen_t on PPC64
4076 * ZipFileUtilityFunctions.cpp was calling newnothrow to
4077 allocate an array. Changed it to call newnothrow_array
4078 instead.
4079 * RefCount::SetFromGeneric() would return B_NO_ERROR if
4080 you tried to call SetFromGeneric(NullRef()), but it
4081 wouldn't actually change the state of the Ref that
4082 you called it on. It now sets the state to NULL in
4083 that case.
4084 * AtomicCounter.h now uses the public QAtomicInt API
4085 when compiled with Qt 4.4.0 or higher. (When compiling
4086 with Qt 4.0.0 through 4.3.x, it will still use the old
4087 private atomic API)
4088 * Applied some tweaks to MuscleSupport.h for better
4089 MacOS/X Leopard compatibility.
4090 * Tweaked SharedMemory.h to compile on MacOS/X Leopard.
4091
4092 v3.40 Released 9/6/2007
4093 - Added experimental IPv6 support. To use MUSCLE with
4094 IPv6, compile your code with the -DMUSCLE_USE_IPV6
4095 flag. The new typedef ip_address will then be compiled
4096 as a 128-bit datatype (the new ip_address class) instead
4097 of being typedef'd to uint32.
4098 - Added a new PacketTunnelIOGateway class that is useful
4099 for "tunneling" arbitrarily large Messages over a
4100 packet-based protocol with a smaller maximum packet
4101 size (e.g. UDP). The PacketTunnelIOGateway class
4102 will packetize large Messages and reconstruct them
4103 from the fragments at the other end.
4104 - Added SetAutoReconnectDelay() and GetAutoReconnectDelay()
4105 methods to the AbstractReflectSession class. You can use
4106 these to easily configure your AbstractReflectSession to
4107 automatically reconnect itself after its connection to
4108 the server has been broken.
4109 - Added a new, optional (autoReconnectDelay) to all the
4110 AddNewConnectSession() methods in MessageTransceiverThread,
4111 QMessageTransceiverTherad, ServerComponent, and
4112 ReflectServer. If specified, this argument will cause
4113 SetAutoReconnectDelay() to be called on the new session.
4114 - Added a new PacketizedDataIO class that can be used
4115 to "wrap" a streaming DataIO class (e.g.
4116 TCPSocketDataIO) and make it act more like a
4117 packet-style DataIO class (e.g. UDPSocketDataIO).
4118 - Accept() now has an optional second argument, which
4119 will return the IP address of the interface that
4120 a connection was accepted on.
4121 - Added a new IPAddressAndPort class which is handy
4122 for encapsulating an IP address and port number
4123 together in the same object.
4124 - PutAcceptFactory() and RemoveAcceptFactory() now
4125 accept optional local interface IP address arguments
4126 so that you can specify that connections to the
4127 server should only be accepted on a certain
4128 interface, if that's what you want.
4129 - PutAcceptFactory() now accepts an optional (retPort)
4130 argument which you can use to find out which port
4131 the factory was installed on.
4132 - PutAcceptFactory() now puts its connection-accepting
4133 socket into non-blocking mode so that the server
4134 can't ever block inside Accept().
4135 - Added a GetLocalInterface() method to the
4136 ReflectSessionFactory class so you can see which
4137 interface(s) that factory is associated with.
4138 - Added some more convenience methods to the Hashtable
4139 class: versions of GetNextKey(), PeekNextKey(),
4140 GetNextValue(), and PeekNextValue() that take
4141 a pointer-reference as their sole argument.
4142 - ReflectSessionFactory objects are now auto-assigned
4143 a globally unique ID number when they are created.
4144 This number can be accessed by calling
4145 ReflectSessionFactory::GetFactoryID().
4146 - Added a simple portscan utility (called "portscan")
4147 to the tests folder.
4148 - Added a GetChildProcessID() method to the
4149 ChildProcessDataIO class, which returns the child
4150 process's process ID (pid).
4151 - Added a ByteBufferDataIO class that lets you read/write
4152 ByteBuffer objects using the DataIO interface (as if
4153 they were files).
4154 - Added GetFirstFieldNameString() and GetLastFieldNameString()
4155 convenience methods to the Message class, so that
4156 you don't need to set up a MessageFieldNameIterator
4157 just to get a single field out of the Message.
4158 - Added a GetSourceOfLastReadPacket() method to the
4159 UDPSocketDataIO class, so that you can find out after a
4160 Read() call where the data you just read came from.
4161 - Added a SetSendDestination() method to the
4162 UDPSocketDataIO class, so that you can have Write()
4163 call sendto() instead of send() if you prefer.
4164 - Added a GetSendDestination() method to the
4165 UDPSocketDataIO class.
4166 - Added a testpacketio test to the tests folder, to
4167 unit-test the PacketizedDataIO class.
4168 - Added a testpackettunnel test to the tests folder,
4169 to unit-test the PacketTunnelIOGateway class.
4170 - Added a NestCount convenience class to the util
4171 folder. This simple class handles some of the
4172 drudge work associated with tracking recursion
4173 levels of recursive function calls.
4174 - Added a Reposition() method to the Hashtable class
4175 that can be used to manually update the position
4176 of an auto-sorted-by-value entry that has been
4177 modified in-place.
4178 - Added MoveToTable() and CopyToTable() convenience
4179 methods to the Hashtable class.
4180 - Made some minor optimizations to the auto-sort-by-value
4181 code in the Hashtable class.
4182 o Removed the MemoryBufferDataIO class, since it
4183 was not very useful or well designed.
4184 o Changed the MessageTransceiverThread class's
4185 GetNextEventFromInternalThread() method so that
4186 it passes back the ReflectSessionFactory's ID
4187 (as a uint32) instead of its port number (as a
4188 uint16). This was done because port numbers
4189 are no longer unique identifiers for session
4190 factories.
4191 o Changed the ReflectSessionFactory::CreateSession()
4192 method to take different arguments (note that this
4193 will break old code that defined its own
4194 ReflectSessionFactory subclasses! That code will
4195 need to be updated to use the new arguments)
4196 o The NetworkInterfaceInfo class's GetName() and
4197 GetDescription() methods now return references to
4198 String objects, instead of character pointers.
4199 o Moved the declaration of Inet_NtoA() from
4200 MiscUtilityFunctions.h to NetworkUtilityFunctions.h.
4201 o Removed the GetLocalIPAddress() function from
4202 NetworkUtilityFunctions.{cpp,h}, as it is redundant
4203 with (and less useful than) the new
4204 GetNetworkInterfaceInfos() function.
4205 o Removed the GetPort() method from the
4206 ReflectSessionFactory class, since factories are
4207 no longer necessarily associated with exactly
4208 one port number.
4209 * The final argument to the CreateAcceptingSocket()
4210 function in NetworkUtilityFunctions.h was documented
4211 incorrectly. It lets you specify the IP address of
4212 a local interface, not a client's IP address.
4213 * The final argument to the SetPort() function in
4214 AcceptSocketsThread.h was documented incorrectly.
4215 It lets you specify the IP address of a local interface,
4216 not a client's IP address.
4217 * Fixed a bug in ReflectServer's ReflectSessionFactory
4218 design that caused muscled not to work correctly if
4219 you told it to listen to more than one port at once.
4220 * Added an #ifdef to NetworkUtilityFunctions.cpp so
4221 that it will compile cleanly on BeOS/R5.0.3
4222 * HashtableIterator::GetValue() was returning a const
4223 reference. Changed it to return a non-const reference,
4224 since there's no reason why you shouldn't be able to
4225 modify the returned object.
4226 * Fixed a bug where calling PutAcceptFactory() with
4227 the port argument set to zero would cause all already
4228 attached accept-factories to be removed.
4229 * Fixed a minor bug in the ReflectServer event loop,
4230 where the fd_sets would be inspected after select()
4231 returned -1/EINTR. This could cause spurious
4232 (albeit generally harmless) read-ready or
4233 write-ready events to be detected.
4234 * The assignment operator, equality operator,
4235 ContainsValue(), and the batch Put() and Remove()
4236 methods in the Hashtable class now specify the
4237 HTIT_FLAG_NOREGISTER flag in their HashtableIterator
4238 objects, for better thread safety.
4239
4240 v3.34 Released 7/12/2007
4241 - Optimized CreateConnectedSocketPair() by having it
4242 use the UNIX socketpair(AF_UNIX) function on systems
4243 that support that call.
4244 o Removed the optional (useNagles) argument from the
4245 CreateConnectedSocketPair() function, since there
4246 is little or no point in using Nagles algorithm
4247 for sockets within the same process. (if you
4248 really needed it for some reason, you could still
4249 call SetSocketNaglesAlgorithmEnabled() manually on
4250 the resulting sockets afterwards)
4251 o test/cvscopy.cpp is now test/svncopy.cpp, since I
4252 don't use CVS anymore.
4253 * Thread::WaitForNextMessageAux() wasn't handling file
4254 descriptors properly when called with a wakeupTime
4255 less than or equal to the current time. Fixed.
4256 o Added a testpulsenode.cpp file to the tests folder, to
4257 test the reliability and scalability of the PulseNode
4258 timed-event-callback implementation.
4259 * Fixed some valgrind hits in NetworkUtilityFunctions.cpp
4260 by having the code check the sin_family of sockaddr
4261 structs before reading any IPv4-specific fields.
4262 * QMuscleSupport.h wouldn't compile under Qt 3.x. Fixed.
4263 * Added Mika Lindqvist's patches to get QMuscleSupport.h
4264 to compile under older versions of Microsoft Visual C++.
4265 * The SharedUsageLimitProxyMemoryAllocator class was not
4266 always freeing all of the cached memory during large free
4267 operations, which could result in the process-memory-cache
4268 getting too large. Fixed.
4269 * Fixed a bug in the PulseNode class's linked list code
4270 that could cause PulseChildren to not have their Pulse()
4271 methods called at the proper times.
4272 * Merged in Bryan Varner's patch to the MessageTransceiverThread
4273 Java class so that spurious connect-succeeded tags are no longer
4274 sent by the I/O thread to the main thread.
4275
4276 v3.33 Released 6/6/2007
4277 - Added a MultiDataIO class, for convenient writing of
4278 mirrored files, etc.
4279 - Added a qtsupport/QMuscleSupport.h header file to
4280 contain Qt-specific utility/helper code. Currently
4281 this file contains only a QString specialization of
4282 the HashFunctor template, to allow QStrings to be
4283 used as keys in a Hashtable.
4284 * SetupSystem.cpp builds again under BeOS (worked around
4285 BeOS's non-standard gmtime_r() call)
4286 * Merged in Lior Okman's patch to the Java client code
4287 to fix a bug where partially received Messages might
4288 get dropped, causing a TCP disconnect.
4289 * Added a loop around the Unix implementation of
4290 SharedMemory::AdjustSemaphore()'s call to semop(),
4291 so that if semop returns EINTR, the call is retried.
4292
4293 v3.32 Released 5/2/2007
4294 - Added a new class, SharedFilterSessionFactory, which looks
4295 at the contents of a shared memory region to decide which
4296 client IP address(es) to allow to connect to the server.
4297 - Added a IsIPAddress(const char *) convenience method
4298 to NetworkUtilityFunctions.{cpp,h}. This method returns true
4299 iff its argument is a string representing an IP address
4300 in human-readable ASCII format.
4301 - Added a new function GetNetworkInterfaceInfos() to
4302 NetworkUtilityFunctions.{cpp,h}. This function returns
4303 a list of NetworkInterfaceInfo objects describing the
4304 various network interfaces currently available on the
4305 host machine.
4306 - test/testnetutil.cpp Now tests GetNetworkInterfaceInfos()
4307 by calling it and printing out the results.
4308 - Added a new argument (emitEndMessageBatchIfNecessary)
4309 to the QMessageTransceiverHandler::Reset() and
4310 QMessageTransceiverThread::UnregisterHandler() methods, so
4311 that if these methods are called while in the middle of a
4312 receiving-Messages batch, the un-registering of the handler
4313 will no longer cause an imbalance between the number of
4314 BeginMessageBatch() and EndMessageBatch() signals that
4315 get emitted by the handler. (You can override this behavior
4316 by passing in false for the new argument)
4317 - The muscle/java/build.xml file now builds JavaDocs too.
4318 o AbstractReflectSession::GetHostName() now returns a
4319 (const String &) instead of a (const char *).
4320 * Fixed a bug in SharedMemory::DeleteArea() that was
4321 preventing the shared memory area's semaphore from
4322 being deleted.
4323 * Rewrote the linked-list handling code in the
4324 QMessageTransceiverThread class to use a doubly-linked-list.
4325 This fixes a bug where the previous singly-linked-list
4326 would occasionally not get updated properly, resulting
4327 in the failure to emit EndMessageBatch signals in some
4328 circumstances.
4329 * The GlobalMemoryAllocator class now calls AboutToFree()
4330 if AboutToAllocate() succeeded but malloc() or realloc()
4331 failed. That way AboutToFree() can undo AboutToAllocate()'s
4332 side effects in the usual fashion.
4333 * The SharedUsageLimitProxyMemoryAllocator class would
4334 deduct a buffer's memory size from the tally twice in
4335 the event of a memory failure. Fixed.
4336 * The SharedUsageLimitProxyMemoryAllocator class now detects
4337 when a program tries to reduce its memory usage counter to
4338 less than zero, and clamps the counter to zero instead of
4339 letting it wrap around to the 4 gigabyte range.
4340 * The GlobalMemoryAllocator class now calls SetAllocationHasFailed()
4341 on the MemoryAllocator object only if the second try to
4342 allocate memory has also failed. That way, if the first try
4343 fails, but the MemoryAllocator's AllocationFailed() method
4344 is able to free up some space to make the second try succeed,
4345 program operation can proceed without any further disruption.
4346 * ProxyMemoryAllocator::AllocationFailed() no longer calls
4347 SetAllocationHasFailed(true) on its slave allocator.
4348 That call is to be made solely by
4349 ProxyMemoryAllocator::SetAllocationHasFailed(), instead.
4350 * AutoCleanupProxyMemoryAllocator::AllocationFailed() now
4351 calls up to its parent class as well as doing its regular
4352 OutOfMemory() callbacks.
4353 * Cleaned up the JavaDoc comments so that they now build
4354 without any warnings from the javadoc utility.
4355 * The POSIX implementation of GetCurrentTime64() wasn't
4356 handling Daylight Savings Time properly, which meant its
4357 result would be off by an hour for part of the year. Fixed.
4358 * Changed some calls to gmtime() and localtime() to gmtime_r()
4359 and localtime_r() respectively, to make them thread-safe.
4360
4361 v3.31 Released 3/14/2007
4362 - The AtomicCounter API is now aware of Qt 4's atomic
4363 counter API, and will use that as its implementation in
4364 Qt-enabled programs compiled on systems where MUSCLE's
4365 own inline-assembly support isn't available.
4366 - hexterm will now send ASCII bytes if you prefix them
4367 with a slash (e.g. "/0 /1 /2" sends 0x30, 0x31, 0x32)
4368 - Added a Hashtable::IndexOfValue() function that lets you
4369 find the index of the first (or last) value of a given
4370 type in a Hashtable. (with O(N) search time)
4371 - Added implementations of the GetByteBufferFromPool() and
4372 GetMessageFromPool() functions that take a user-specified
4373 ObjectPool instead of using a default object pool.
4374 - Added support for a new compiler flag, MUSCLE_64_BIT_PLATFORM,
4375 which can be defined in your Makefile if you are on a 64-bit
4376 platform that isn't autodetected inside of MuscleSupport.
4377 - Added INT32_FORMAT_SPEC and UINT32_FORMAT_SPEC macros so
4378 that printf() statements can be made less architecture-specific.
4379 - Added a section to the test/testtypdefs.cpp test that checks
4380 to make sure the *_FORMAT_SPEC macros are working correctly on
4381 the current platform.
4382 - DataNode::GetChildIterator() now takes an optional flags parameter
4383 that is passed on to the HashtableIterator constructor.
4384 - Added a DataNode::HasChildren() convenience method.
4385 o Made the String class's destructor inline.
4386 * SetupSystem.cpp wouldn't compile on 64-bit systems when
4387 using Mutexes to implement atomic operations. Fixed.
4388 * Merged in Lior Okman's patch to the Java client code that
4389 sets the socket's send and receive buffers to 128KB.
4390 * Merged in Lior Okman's patch to the Java client code to
4391 fix an occasional busy-loop that could occur when
4392 receiving very large (>400KB) Message objects.
4393 * Merged in Nathan Whitehorn's patch to the FreeBSD
4394 #ifdef's in NetworkUtilityFunctions.cpp.
4395 * Fixed a bug in MemMem() that where an incorrect return
4396 value would be returned when both buffers were the same size.
4397 * Fixed a bug in RawQueryFilter::SetFromArchive() that could
4398 cause a crash.
4399 * Some of muscle's text output would be wrong on 64-bit
4400 platforms. Fixed by changing all printf()'s to use the new
4401 INT32_FORMAT_SPEC and UINT32_FORMAT_SPEC macros when appropriate.
4402 * Fixed a bug in the Makefiles so that g++ now compiles all code
4403 with all warnings enabled (except the multi-char constants warning).
4404 * Went through the test files and fixed the minor problems that
4405 were causing them to generate compiler warnings with -Wall enabled.
4406 * hexterm now prints out an error message when it aborts due to
4407 an invalid return code from Read() or Write().
4408
4409 v3.30 Released 1/16/2007
4410 ***NOTE*** In this release, the byte-swapping functions for
4411 floating point and double-precision floating point operations
4412 have been renamed. If your code handles floating-point byte
4413 swapping itself, you will need to update your code before it
4414 will compile. See the FLOAT_TROUBLE and DOUBLE_TROUBLE comments
4415 in support/MuscleSupport.h for details about this issue.
4416 - Added a QMessageTransceiverHandler helper class to
4417 QMessageTransceiverThread.{cpp,h}. This class handles the
4418 multiplexing and demultiplexing of multiple session objects inside
4419 a single QMessageTransceiverThread object, so that Qt-based programs
4420 that use a N:1 session-to-thread model will be easier to write
4421 and maintain.
4422 - Added a QMessageTransceiverThreadPool helper class to
4423 QMessageTransceiverThread.{cpp,h}. This class manages the automatic
4424 creation of QMessageTransceiverThreads when QMessageTransceiverHandlers
4425 are set up, so that an N:1 session-to-thread model can be implemented
4426 automatically in Qt-based programs.
4427 - Rewrote hexterm's output routine to be more useful; it now outputs
4428 both ASCII and hex data, in a format similar to that used by od.
4429 - Added chatclient.cpp to the tests folder. chatclient.cpp is a
4430 simple command-line BeShare compatible chat client (previously
4431 distributed separately as "Clyde")
4432 - Added a minichatclient.c to the tests folder. minichatclient.c
4433 is a C-only implementation of chatclient.cpp, just to show how
4434 it can be done using only the MiniMessage and MiniMessageGateway APIs.
4435 - Added a MemMem() function to MiscUtilityFunctions.{cpp,h}. MemMem()
4436 is similar to strstr(), except that instead of operating on
4437 NUL-terminated strings, it operates on binary data.
4438 - Rewrote the PulseNode class to be more efficient when many children
4439 are present -- PulseNode now stores its children in ordered linked
4440 lists rather than in a Hashtable, and it no longer needs to iterate
4441 over all children in order to recalculate the next event time.
4442 - Merged in Lior Okman's enhancement to the Java API:
4443 StringBuffer is now used in toString() methods, instead of
4444 concatenating strings directly.
4445 - Merged in Lior Okman's enhancement to the Java API:
4446 Faster ByteBuffer operations are now used to fill in arrays,
4447 instead of looping over the arrays and manually setting the values.
4448 - Merged in Lior Okman's enhancement to the Java API:
4449 Use List instead of Vector and HashMap instead of HashTable. This is
4450 to lose the extra unneeded synchronization point that exists in these
4451 old and deprecated (as of Java 1.2) classes. Since ByteBuffer requires
4452 at least JDK 1.4 anyway, there is no need to use the older API.
4453 - Merged in Lior Okman's enhancement to the Java API:
4454 Use Iterator instead of Enumeration - same reason as above.
4455 Note that this change will break compatibility with old Java
4456 code that calls Message.fieldNames() -- it will need to be
4457 updated to use an Iterator instead of an Enumeration.
4458 - Merged in Lior Okman's enhancement to the Java API:
4459 Changed the implementation of Queue.removeAllElements() to a
4460 more efficient implementation.
4461 - Merged in Lior Okman's enhancement to the Java API:
4462 Modified the ThreadPool to use a ThreadGroup and provide thread names.
4463 This makes the class more profiler-friendly.
4464 - Merged in Lior Okman's enhancement to the Java API:
4465 Message.flatten() is faster now, because it doesn't call
4466 flattenedSize() as much anymore.
4467 - Merged in Lior Okman's patch that adds a setOutgoingEncoding()
4468 method to the Java IOGateway classes, so that you can change
4469 message encodings on the fly.
4470 - Made the IOGateway _outgoingEncoding variable private:
4471 use setOutgoingEncoding() and getOutgoingEncoding() to access it.
4472 - Merged in Nathan Whitehorn's patch to make FinalizeAsyncConnect()
4473 work properly under FreeBSD 7.
4474 - Merged in Nathan Whitehorn's patch to fix a bug in SSLSocketDataIO
4475 (previously, it could sometimes error out if the message length
4476 exceeded the network's MTU)
4477 - Rewrote the B_SWAP_* macros as C-compatible inline functions
4478 (previously they called the muscleSwapBytes() template function,
4479 which made them unusable in C programs)
4480 - Added the new replacement floating-point byte-swap API to
4481 support/MuscleSupport.h, including the following new functions:
4482 B_HOST_TO_BENDIAN_IFLOAT B_BENDIAN_TO_HOST_IFLOAT
4483 B_HOST_TO_LENDIAN_IFLOAT B_LENDIAN_TO_HOST_IFLOAT
4484 B_HOST_TO_BENDIAN_IDOUBLE B_BENDIAN_TO_HOST_IDOUBLE
4485 B_HOST_TO_LENDIAN_IDOUBLE B_LENDIAN_TO_HOST_IDOUBLE
4486 - Added a -DMUSCLE_AVOID_INLINE_ASSEMBLY flag that you can set if
4487 you want to avoid the use of inline assembly for some reason.
4488 - Changed the ConvertFromNetworkByteOrder() and ConvertToNetworkByteOrder()
4489 private virtual methods in the Message::PrimitiveDataTypeArray private
4490 class by changing them to operate on N items at once, instead of having
4491 to be called repeatedly for each item in an array.
4492 - PointerDataArray::ConvertFromNetworkByteOrder() and
4493 ConvertToNetworkByteOrder() now cause an assertion failure if called
4494 (because they should never be called: pointers aren't serializable)
4495 - Added a set of common comparison functions (Int8CompareFunc,
4496 Int16CompareFunc, Int32CompareFunc, Uint8CompareFunc, etc)
4497 to MuscleSupport.h because I was tired of reimplementing them
4498 separately every time I needed to sort a Queue or a Hashtable.
4499 - support/MuscleSupport.h now defines a new preprocessor constant,
4500 SELECT_ON_FILE_DESCRIPTORS_NOT_AVAILABLE, when compiled on an OS
4501 that doesn't know how to select on file descriptor (e.g. stdin).
4502 Currently that includes Win32 and BeOS.
4503 o Removed the GetChildren() and GetPulseChildrenIterator() methods
4504 from the PulseNode class, since they are no longer applicable.
4505 o Separated the single-argument Hashtable and Queue constructors into
4506 two separate constructors: a zero-argument default constructor, and
4507 a single-item constructor tagged "explicit". That way nonsensical
4508 conversions (e.g. myHashtable.Put(5)) get caught at compile-time
4509 rather than becoming hard-to-discover run-time errors.
4510 o Rewrote muscleSwapBytes() to use a union instead of pointer-magic.
4511 o The Java IOGateway classes are once again declared public instead
4512 of being package-private -- that way you don't have to use the
4513 MessageIOGatewayFactory class if you don't want to.
4514 o MakePrettyTypeCodeString() is now implemented as an inline function
4515 instead of a preprocessor macro.
4516 * Merged in Lior Okman's fix for the flattenMessage() methods
4517 in the MessageIOGateway classes, to make them work reliably
4518 with non-blocking sockets.
4519 * Fixed a bug in MessageTransceiverThread.cpp that would cause
4520 many of the commands sent to the internal thread to be received
4521 by all of the internal thread's sessions instead of just the
4522 intended target.
4523 * Fixed some bugs in testendian.cpp, and made its output prettier
4524 and more informative.
4525 * Removed the following functions from MuscleSupport.h:
4526 B_SWAP_FLOAT B_SWAP_DOUBLE
4527 B_HOST_TO_LENDIAN_FLOAT B_HOST_TO_BENDIAN_FLOAT
4528 B_HOST_TO_LENDIAN_DOUBLE B_HOST_TO_BENDIAN_DOUBLE
4529 B_LENDIAN_TO_HOST_FLOAT B_BENDIAN_TO_HOST_FLOAT
4530 B_LENDIAN_TO_HOST_DOUBLE B_BENDIAN_TO_HOST_DOUBLE
4531 Because they cannot be made to work reliably on x86-architecture
4532 chips. (See the FLOAT_TROUBLE and DOUBLE_TROUBLE comments in
4533 support/MuscleSupport.h for details)
4534 * Message.py's unit test now correctly reads and writes its file
4535 in binary mode. Thanks to David Rene for reporting this bug.
4536
4537 v3.24 Released 11/28/2006
4538 - The MacOS/X implementation of GetRunTime64() is now implemented
4539 using the CoreServices UpTime() function instead of POSIX times(),
4540 which makes it more efficient, allows it to return more accurate
4541 values, and avoids some potential problems with wrapping.
4542 - Added GetKey() and GetValue() convenience methods to the
4543 HashtableIterator class.
4544 - Added -- and ++ operators to the HashtableIterator class.
4545 - Added SetBackwards() and IsBackwards() methods to the
4546 HashtableIterator class.
4547 - Added a GetFlags() method to HashtableIterator class.
4548 - Added a new MessageFieldNameIterator constructor that takes
4549 a Message object. This is more efficient than calling
4550 msg.GetFieldNameIterator() and requires less typing.
4551 - Added ++ and -- operators to the MessageFieldNameIterator class.
4552 - Added a GetFieldName() method to the MessageFieldNameIterator class.
4553 - Each DataNode object now keeps a running maximum of the IDs in
4554 the child nodes that are attached to it. You can access this
4555 running maximum via the new GetMaxKnownChildIDHint() method.
4556 This value can be useful when generating a unique name for
4557 a new child node.
4558 - Also added a SetMaxKnownChildIDHint() method to the DataNode
4559 class. This lets you manually reset the hint if you need to.
4560 - Updated test/testhashtable.cpp so that it now tests for the
4561 HashtableIterator bug described below.
4562 - The MessageReplaceFunc callback used by CloneDataNodeSubtree()
4563 now takes a node-path as its first argument, in addition to the
4564 other arguments it took before.
4565 - The Python error strings generated by the ConvertMessageToPyObject()
4566 in PythonUtilityFunctions.cpp are now a bit more informative (they
4567 contain the problematic field name and/or type code)
4568 o Reduced the default output-stall timeout from 20 minutes
4569 to 3 minutes.
4570 o Removed the () operator from the MessageFieldNameIterator class
4571 because it was inconsistent with the operators of other iterator
4572 classes, and rarely (never?) used anyway.
4573 o Updated the copyright notices to 2007 Meyer Sound Laboratories Inc
4574 (a.k.a. the new owners of what was Level Control Systems)
4575 * The output-stall-detector mechanism would not disconnect
4576 moribund clients in a timely manner if the server was
4577 completely idle. Now it does.
4578 * Fixed a subtle bug in the HashtableIterator class that could
4579 cause the iterator to skip past the 2nd item in a traversal
4580 if the 1st item in the traversal was deleted at the wrong time.
4581 * Updated the portablereflectclient.cpp and portableplaintextclient.cpp
4582 example programs to include a hack-around for Win32's inability
4583 to select() on stdin.
4584
4585 v3.23 Released 9/15/2006
4586 - Added Nathan Whitehorn's SSLSocketDataIO class to the dataio
4587 subfolder. This class can be used to layer MUSCLE traffic over
4588 an SSL connection. Thanks Nathan! Note that this code requires
4589 the OpenSSL developer's toolkit to be installed before it will
4590 compile.
4591 - Enhanced the ParseArgs() routine to handle spaces intelligently
4592 (e.g. "x = 5" is now equivalent to declaring a key "x" with value
4593 "5", not declaring three separate variables named "x", "=", and "5")
4594 - Added Put() and Remove() methods to the Hashtable class that
4595 can put or remove the contents of an entire Hashtable at once.
4596 - Added NybbleizeString() and DenybblizeString() convenience functions
4597 to the MiscUtilityFunctions API.
4598 - Added a MUSCLE_USE_QUERYPERFORMANCEHARDWARE compile-time flag that
4599 tells MUSCLE to use QueryPerformanceCounter() under Windows instead
4600 of timeGetTime(). Specifying this flag improves GetRunTime64()'s
4601 accuracy, but QueryPerformanceCounter() is known to have problems on
4602 certain PC systems.
4603 * Fixed the Win32 and POSIX implementations of GetRunTime64() so that
4604 when the underlying OS clock "wraps" around to zero, it is detected
4605 and transparently handled so that the values returned by GetRunTime64()
4606 continue to increase monotonically.
4607 * Fixed the vc++/muscle.dsp project file so that things link properly
4608 again (thanks to Maurizio for help with this)
4609 * Added several tweaks to compile properly under MS Visual Studio 2005.
4610 * Made sure the files in the vc++ subfolder have Windows line endings.
4611 * Fixed a couple of bugs in the String class -- empty strings that
4612 had extra space preallocated in them could end up with unitialized
4613 garbage in them.
4614 * MuscleSupport.h now #defines WIN32 if _MSC_VER is defined.
4615 * Updated the QMessageTransceiverThread and QAcceptSocketThread
4616 classes further, so that they compile under Qt4 even when Qt3
4617 compatibility support is disabled.
4618 * Fixed a problem under Win32, where GetSystemPath() would return an
4619 incorrectly formed path when unicode characters were present in the
4620 path name.
4621
4622 v3.22 Released 7/5/2006
4623 - Updated the Mutex, Thread, and QMessageTransceiverThread classes so
4624 that they are compatible with both Qt3 and Qt4.
4625 - Added a Python implementation of the zlib/ZLibUtilityFunctions.{cpp,h}
4626 API. It is in python/ZLibUtilityFunctions.py
4627 * Fixed a valgrind hit in the Linux implementation of GetSystemPath()
4628 * Commented out the buggy-QueryPerformanceCounter() warning under Win32,
4629 since it usually causes more confusion than enlightenment when it
4630 is printed.
4631 * Changed the custom-event codes in QMessageTransceiverThread.cpp
4632 and QAcceptSocketsThread.cpp to be in the allowed range for user-codes.
4633 * Added Lior Okman and Rony Gutherz' patches to re-enable compilation
4634 on 64-bit systems, Solaris, MSVC, and Windows 2000.
4635 * Added Mika Lindqvist's patch to allow use of the newnothrow macro
4636 under VC++6.
4637 * Updated the Makefile in the borland subdirectory to compile correctly.
4638
4639 v3.21 Released 5/27/2006
4640 - Added SYSTEM_PATH_USERHOME, SYSTEM_PATH_DESKTOP, and
4641 SYSTEM_PATH_DOCUMENTS, and SYSTEM_PATH_ROOT to the list
4642 of directories returnable by GetSystemPath().
4643 - GetHostByName() now requires a second argument, (expandLocalhost),
4644 which determines whether 127.0.0.1 should be returned verbatim, or
4645 expanded out to the primary local IP address.
4646 - Added an (expandLocalhost) argument to the various AddNewConnectSession()
4647 methods that take a string for a hostname argument.
4648 - Added an (expandLocalhost) argument to the GetPeerIPAddress() function.
4649 - Added a RemoveEscapeChars() utility function to StringMatcher.{cpp,h}
4650 - Rewrote GetLocalIPAddress() to use the if_nameindex() API if it
4651 is available. If not, it will fall back to the old method of using
4652 gethostname().
4653 - StorageReflectSession::SaveNodeTreeToMessage() and
4654 StorageReflectSession::RestoreNodeTreeFromMessage() now both take
4655 an optional (maxDepth) argument which can be used to specify the
4656 maximum depth of the node-subtree to be saved or restored.
4657 - The PR_COMMAND_GETDATATREES Message now has an optional PR_NAME_MAXDEPTH
4658 int32 field: If specified, the returned data trees will be clipped to
4659 the specified maximum depth
4660 - Added a PutAndGet() convenience method to the Hashtable class.
4661 This method puts a new object into the Hashtable, and returns a pointer
4662 to the object in the table.
4663
4664 v3.20 Released 3/20/2006
4665 - Added SetGlobalQueryFilterFactory() and GetGlobalQueryFilterFactory()
4666 calls, so that it is possible for MUSCLE-based servers to install
4667 their own custom QueryFilterFactory objects if desired.
4668 o Moved the DataNode class out into its own file, DataNode.{cpp,h}.
4669 It is no longer an inner class of the StorageReflectSession class.
4670 o All QueryFilter::Matches() methods now take a DataNode pointer
4671 as their second argument. None of the built-in QueryFilter subclasses
4672 use this value, but it is available so that custom QueryFilters can
4673 use DataNode information in their matching decisions if necessary.
4674 o Renamed InstantiateQueryFilter() to CreateQueryFilter(), and
4675 made it a virtual method in the new QueryFilterFactory class,
4676 instead of a global function.
4677 * Added serialization to muscleAlloc()/muscleRealloc()/muscleFree(),
4678 to avoid potential race conditions in multithreaded programs that
4679 have memory-usage-tracking enabled.
4680 * Fixed a bug in the Java receive code that could cause a
4681 parse error and subsequent disconnect if the Message stream
4682 was uncompressed (DEFAULT_MESSAGE_ENCODING) and a large
4683 Message was followed by a small one.
4684 * Fixed a typo in the java/build.xml file.
4685 * Rewrote MusclePowerPCSwapDouble() and MuscleX86SwapDouble()
4686 to use unions instead of C-style casting. Doing it this way
4687 makes them more readable and avoids errors due to uncontrolled
4688 interactions with g++'s optimizer.
4689 * Made the testendian test program a little more robust.
4690
4691 v3.11 Released 3/1/2006
4692 - Added a testsysteminfo.cpp test to the test folder, to test
4693 the functions in the SystemInfo.{cpp,h} files.
4694 - Merged in Lior Okman's updates to the muscle Java classes so that
4695 they now support the new, more efficient java.nio.* interfaces.
4696 Note that this means that the Java API now requires Java 1.4.0
4697 or higher; let me know if that is a problem for you.
4698 - Added zlib/ZipFileUtilityFunctions.{cpp,h}, which contain functions
4699 that create a .zip file from a MUSCLE Message, and vice versa.
4700 Also added a testzip.cpp program to the test folder to test them.
4701 - Added a more convenient Inet_NtoA(uint32) function (that returns
4702 a String) to MiscUtilityFunctions.{cpp,h}
4703 o Optimized TCPSocketDataIO::FlushOutput() slightly under Linux.
4704 * Merged in Lior Okman's AMD-64 compatibility patch.
4705 * Patched NetworkUtilityFunctions.cpp to handle net_length_t
4706 properly under *BSD.
4707
4708 v3.10 Released 1/16/2006
4709 - Added the JCraft JZLib code to the included Java code tree, so that
4710 the MUSCLE Java code can again be compiled as provided.
4711 - Added a hashCode() method to the Java com.lcs.muscle.support.Point class.
4712 - Added NybbleizeData() and DenybbleizeData() convenience functions
4713 to MiscUtilityFunctions.{cpp,h}.
4714 - Added GetFirstKey(), GetFirstValue(), GetLastKey(), and GetLastValue()
4715 utility methods to the Hashtable class.
4716 - Added a HTIT_FLAG_NOREGISTER flag to the HashtableIterator class
4717 that (when specified) will prevent the HashtableIterator from registering
4718 itself with the Hashtable. This option allows you to do a 100%
4719 thread-safe Hashtable iteration, at the expense of requiring you to
4720 guarantee that the Hashtable won't be modified during the traversal.
4721 - Added a HasItems() convenience method to the Queue and Hashtable classes.
4722 This method returns true iff there is at least one item present in
4723 the object (i.e. it is the logical negation of the IsEmpty() method)
4724 - Added a HasNames() convenience method to the Message class. This method
4725 returns true if the Message contains any fields.
4726 o Removed the Flattenable::CopyToImplementation() methods since they were
4727 redundant. Instead, CopyTo() just calls CopyFromImplementation() with
4728 the arguments reversed.
4729 o Replaced the boolean (backwards) argument for HashtableIterators with a
4730 uint32 (flags) argument. Currently supported flags are
4731 HTIT_FLAG_BACKWARDS (same as backwards=true in older versions) and
4732 the new HTIT_FLAG_NOREGISTER (see above for details)
4733 o Inlined some trivial one-liner methods in the Message class, for efficiency.
4734 * Merged in Eli "Scanty" Dayan's portability fixes so that the
4735 code again compiles properly under Solaris. Thanks Scanty!
4736 * const methods in the Message class are now properly thread-safe
4737 (provided the Message object isn't altered by any other threads
4738 during their execution), thanks to the use of the
4739 HTIT_FLAG_NOREGISTER flag.
4740 * The math used in the MUSCLE_POWERPC_TIMEBASE_HZ implementation of
4741 GetRunTime64() would overflow after a week or two of uptime,
4742 causing GetRunTime64() to return incorrect results. Fixed.
4743 * PythonUtilityFunctions.cpp now compiles correctly under MacOS/X Tiger.
4744 * Tweaked MuscleSupport.h so that MacOS/X will properly use the
4745 x86 assembly language functions when running on an Intel-based system.
4746
4747 v3.03 Released 10/10/2005
4748 - Added a GetLocalIPAddress() function to NetworkUtilityFunctions.{cpp,h}.
4749 This function returns the IP address(es) of the machine it is running on.
4750 - Refactored the ThreadWorkerSessionFactory::CreateSession() method out
4751 into two methods: CreateSession() and CreateThreadWorkerSession(). That
4752 way subclasses can override CreateThreadWorkerSession() but still take
4753 advantage of the session-accepted-notification functionality present
4754 in CreateSession().
4755 - MessageTransceiverThread now identifies sessions via their root node
4756 path instead of just their session ID. (e.g. "/192.168.0.5/17", not "17")
4757 - Added David Grossman's -DMUSCLE_PREFER_QT_OVER_WIN32 patch, so that you
4758 can choose at compile time whether Muscle should prefer to use Win32 or
4759 Qt APIs for its threading/synchronization mechanisms.
4760 - Added the 'cvscopy' utility program to the test folder.
4761 * GetPeerIPAddress() and GetHostByName() now call GetLocalIPAddress() if
4762 necessary to determine the local IP address, rather than returning
4763 127.0.0.1.
4764 * GetSystemPath(SYSTEM_PATH_EXECUTABLE) would break under MacOS/X if
4765 the executable path contained any non-ASCII characters. Fixed.
4766 * GetSystemPath() was broken under Win32 if Unicode support was
4767 enabled. Fixed.
4768 * hexterm now compiles properly under MacOS/X.
4769
4770 v3.02 Released 9/10/2005
4771 - The second argument to Hashtable::GetOrPut() is now optional.
4772 - Merged in Lior Okman's changes to the Java client API: these
4773 included several bug fixes and the added ability to send
4774 compressed Messages. (If you have JZLib in your class path,
4775 you can receive compressed Messages also)
4776 - Added Lior's build.xml file for ant-based compilation and
4777 JAR-packaging of the muscle java API (into the java folder)
4778 - Added FailoverDataIO.{cpp,h} to the support folder. FailoverDataIO
4779 is a class that supports automatic failover across multiple redundant
4780 DataIO streams.
4781 - Connect() now takes an optional timeout argument, for people
4782 who are too impatient to wait for the operating system's standard
4783 TCP connect timeout period to elapse.
4784 - The ParseFile() function in MiscUtilityFunctions.{cpp,h} now supports
4785 hierarchical sub-sections (delimited in the text file with "begin foo"
4786 and "end" tag lines).
4787 - Added testparsefile.cpp to the test folder.
4788 o Moved the implementations of Inet_AtoN(), Inet_NtoA(),
4789 SetLocalHostIPOverride() and GetLocalHostIPOverride() from
4790 NetworkUtilityFunctions.cpp to SetupSystem.cpp, so that projects
4791 can include MiscUtilityFunctions.cpp without having to also
4792 include NetworkUtilityFunctions.cpp
4793 o Removed the MUSCLE_USE_CLONE support from the Thread class, since it
4794 didn't work properly anyway.
4795 * The Win32 implementation of the Thread class would leak a thread handle
4796 each time the internal Thread terminated. Thanks to Eivind Midtgård
4797 and Raymond Dahlberg for providing the fix!
4798
4799 v3.01 Released 8/13/2005
4800 - Added a "shared" parameter to the BindUDPSocket() function,
4801 to support the simultaneous reception of broadcast UDP packets
4802 by multiple processes on a single computer.
4803 - Updated the included zlib distribution to v1.2.3
4804 - Updated the hexterm app to handle UDP packet I/O (in addition
4805 to the TCP stream and serial device data I/O it could do before)
4806 - Added equality (==) and inequality (!=) operators to the Hashtable class.
4807 * GetSystemPath(SYSTEM_PATH_EXECUTABLE) now returns the proper
4808 path under Linux (it uses the /proc filesystem to figure it out)
4809 * ChildProcessDataIO now uses the constants found in sys/ttydefaults.h
4810 to fill in the termios struct, instead of using hard coded magic numbers.
4811
4812 v3.00 Released 7/12/2005
4813 NOTE: THIS RELEASE BREAKS SOURCE CODE COMPATIBILITY WITH PREVIOUS
4814 RELEASES OF THE MUSCLE API. IF YOU HAVE CODE THAT WAS WRITTEN FOR
4815 PREVIOUS VERSIONS OF MUSCLE, YOU WILL NEED TO MODIFY IT SOMEWHAT
4816 IN ORDER FOR IT TO COMPILE AND RUN PROPERLY. SEE THE TWO ITEMS
4817 MARKED WITH (o) BELOW FOR DETAILS.
4818 - Added Matt Emson's client API for Delphi, in the "delphi"
4819 subdirectory. Thanks, Matt!
4820 - Updated the included zlib distribution to v1.2.2.
4821 - Added StoreTraceValue(), TCHECKPOINT(), SetTraceValuesLocation(),
4822 and associated functions to MuscleSupport.h. These functions can
4823 be useful in tracking down where code is executing at when a
4824 debugger isn't available.
4825 - Added a maxDepth argument to the LogStackTrace() call.
4826 - Added a PrintStackTrace() function to syslog/SysLog.{cpp,h}.
4827 This is similar to LogStackTrace(), but the stack trace
4828 goes directly to stdout instead of going to the log facility.
4829 - Added a "win32client" test/example app to the test folder.
4830 This app test/demos the Win32MessageTransceiverThread class.
4831 A VC++ project file (win32client.vcproj) is also included.
4832 - Added a SetSignalHandlingEnabled() method to the ReflectServer
4833 class, to allow servers to exit cleanly when an interrupt
4834 signal is received.
4835 - muscled now accepts an optional "catchsignals" argument that
4836 enables handling of interrupt signals (Control-C) to initiate
4837 a controlled shutdown.
4838 - muscleMax() and muscleMin() can now take up to five arguments,
4839 for convenience.
4840 - If you define the compiler constant MUSCLE_ENABLE_MEMORY_PARANOIA
4841 to an integer value (and also define MUSCLE_ENABLE_MEMORY_TRACKING),
4842 then the muscle memory allocator/deallocator code will add that many
4843 guard values to the front and end of all dynamically allocated
4844 buffers in order to detect bad memory writes. The guard values will
4845 be checked whenever the buffers are freed or resized, to make sure
4846 they haven't been overwritten, and it will also fill all allocated
4847 and freed buffers with special garbage bytes (0x55 and 0x66),
4848 so that it will be more obvious when freed or uninitialized
4849 memory is read. This slows down execution a bit and uses up
4850 extra memory, so it should only be enabled while debugging.
4851 - Added a MemoryParanoiaCheckBuffer() function to
4852 GlobalMemoryAllocator.{cpp,h}. Call this function to manually
4853 validate that an allocated memory buffer hasn't been corrupted.
4854 - All AbstractObjectRecycler objects (i.e. all ObjectPools)
4855 now register themselves in a global linked list, so that
4856 they can be iterated over.
4857 - Added the function GlobalFlushAllCachedObjects() to the
4858 AbstractObjectRecycler class.
4859 - Added a FlushCachedObjects() virtual method to the
4860 AbstractObjectRecycler class. This method is implemented
4861 in the ObjectPool subclasses to call Drain().
4862 - The CompleteSetupSystem destructor now calls
4863 AbstractObjectRecycler::GlobalFlushAllCachedObjects(), so
4864 that all the ObjectPools get flushed before any static objects
4865 start getting destroyed. This helps avoid dangling pointer
4866 problems caused by the undefined ordering of static object
4867 destructor calls.
4868 - Added GetCount() and SetCount() methods to the AtomicCounter
4869 class, since it's occasionally necessary (albeit discouraged)
4870 to get or set the counter's value explicitly.
4871 - Added IsRefPrivate() and EnsureRefIsPrivate() methods to
4872 the Ref class to help facilitate Copy-on-Write semantics.
4873 - Added a FlushInput() method to the PlainTextMessageIOGateway class.
4874 - Added a BUILDOPTIONS.txt file to the muscle folder, to document
4875 the various compile-time flags that muscle uses.
4876 - Added WriteFully() and ReadFully() convenience methods to
4877 the DataIO class. These methods call Write() or Read()
4878 in a loop as necessary to guarantee that the whole buffer
4879 get written.
4880 - Added new convenience methods FlattenToByteBuffer(),
4881 UnflattenFromByteBuffer(), FlattenToDataIO() and
4882 UnflattenFromDataIO() to the Flattenable class, so that you
4883 can now Flatten()/Unflatten() to/from ByteBuffers and
4884 DataIOs with a single call when using blocking I/O.
4885 - Added a GetLength() convenience function to the Flattenable
4886 class, for easy determination of a DataIO's length in bytes.
4887 - Rewrote InflateMessage() and DeflateMessage() so that they
4888 spend less time holding the global muscle lock.
4889 o Changed all Ref arguments to be passed by const reference
4890 instead of by value. Note that this change will break most
4891 current Muscle-using source code -- your source code will
4892 need to be changed to match, in order for the virtual methods
4893 to be overridden properly. To update your code, you should
4894 change all function arguments of type BlahRef to (const BlahRef &).
4895 o Moved the AbstractObjectRecycler pointer out of the Ref class
4896 and into the RefCountable class, and changed it into an
4897 AbstractObjectManager pointer. Removed the recycler
4898 argument from all Ref class methods. This makes the
4899 Ref class a bit simpler and more efficient, but it also
4900 breaks existing source code. To update your code, you
4901 should change all instances of BlahRef(blah, NULL) to
4902 BlahRef(blah), and all instances of BlahRef(blah, NULL, false)
4903 to BlahRef(blah, false).
4904 o Replaced StorageReflectSession::DrainPools() with
4905 AbstractObjectRecycler::GlobalFlushAllCachedObjects(),
4906 which does the same thing but more thoroughly, since
4907 it flushes all ObjectPools and not just a few of them.
4908 o Moved a few overly large inline convenience functions into
4909 SetupSystem.cpp, for faster compilation and smaller binaries.
4910 o InflateMessage() now guarantees that the inflated Message
4911 will have the same 'what' code as the passed-in Message
4912 (the what code of the 'interior' Message is ignored).
4913 * Added a newnothrow_array #define to MuscleSupport.h and
4914 changed all the muscle code to use it instead of
4915 newnothrow when allocating arrays. This macro works
4916 the same as new (nothrow) for arrays, except it works
4917 around a bug in gcc 3.x that could cause crashes on
4918 memory failure.
4919 * ChildProcessDataIO now forces the removal if the SIGHUP
4920 signal handler in the child process, so that any
4921 grandchild processes will be cleaned up when the child
4922 process is killed.
4923 * Improved ChildProcessDataIO handling of restricted
4924 permissions on the /dev/tty* nodes.
4925 * Under Win32, if there were no sockets to select() on, select()
4926 would error out and the server loop would return. Fixed.
4927 * Log() and LogTime() could forget to unlock the global
4928 muscle lock if called re-entrantly. Fixed.
4929 * Fixed a nasty bug in the MUSCLE_POWERPC_TIMEBASE_HZ inline
4930 assembly implementation of GetRunTime64() that would cause
4931 GetRunTime64() to very occasionally go into an infinite loop.
4932
4933 v2.65 Released 5/20/2005
4934 - Optimized the String class by providing overloaded
4935 implementations of various common methods that take a
4936 (const char *) directly, rather than a (const String &).
4937 This eliminates much of the need for the compiler to
4938 construct and destroy temporary String objects when
4939 using string literals.
4940 - Added StartsWith() and EndsWith() convenience methods
4941 to the Queue class.
4942 o Made about a dozen one-liner String methods into into
4943 inline methods, to reduce CPU overhead in calling them.
4944 * Fixed a bug in the Windows implementation of
4945 ChildProcessDataIO that would cause the child process
4946 to be killed the first time it generated any text to stdout.
4947 * Fixed a problem in GetHumanReadableTimeValues() when
4948 compiling under Windows with pre-WinXP headers. Thanks
4949 to Mika Lindqvist for helping with this fix.
4950 * Added an #ifdef for _SOCKLEN_T to NetworkUtilityFunctions.cpp,
4951 so that net_length_t will be typedef'd properly on systems
4952 that need it.
4953
4954 v2.64 Released 4/20/2005
4955 - ConvertMessageItemToPyObject() now handles restoring list
4956 objects and dictionary objects.
4957 - testendian.cpp now does a bit more thorough job of testing
4958 the correctness of the byte swapping routines
4959 - Merged in Mika Lindqvist's patch to add inline-assembly
4960 implementations of the byte-swapping and atomic counter
4961 functions for the Win32/Visual C++ build environment.
4962 - Added Equals(char), EqualsIgnoreCase(char), EndsWith(char),
4963 EndsWithIgnoreCase(char), StartsWith(char), and
4964 StartsWithIgnoreCase(char) methods to the String class.
4965 - Added an optional (maxResults) parameter to
4966 ServerComponent::FindMatchingSessions(), and added a
4967 ServerComponent::FindMatchingSession() convenience method.
4968 - MuscleSupport.h now looks for a MUSCLE_FD_SETSIZE compiler
4969 constant; if found, it will use that to force the host's
4970 FD_SETSIZE to a new value (particularly useful under
4971 Windows where FD_SETSIZE is a pitiful 64... just add
4972 -DMUSCLE_FD_SETSIZE=512 to make it more reasonable)
4973 - Added a SetFromGenericUnchecked() method to the Ref class,
4974 for fast/unsafe reference-type conversion.
4975 - Added testtime.cpp to the test folder, to test MUSCLE's
4976 time/date handling functions.
4977 - GetCurrentTime64(), GetHumanReadableTimeValues(),
4978 ParseHumanReadableTimeString(), and GetHumanReadableTimeString()
4979 now all take a timezone argument that indicates whether the uint64
4980 time value arguments are meant to represent local time or UTC.
4981 These parameters have default values that are set to preserve
4982 the previous behavior, for backward compatibility.
4983 o Moved QMessageTransceiverThread's event handling code
4984 out into a virtual separate method, called
4985 HandleQueuedIncomingEvents().
4986 o Removed "volatile" keyword from the assembly byte-swapping
4987 inline function implementations, since it is not necessary
4988 and impedes optimization.
4989 * Merged in David Grossman's Visual C++ compatibility changes.
4990 * Fixed several bugs in the String class where memcpy() was
4991 being called in situations where memmove() was necessary.
4992
4993 v2.63 Released 2/6/2005
4994 - muscled now accepts "port=0" as a command line argument.
4995 This argument will cause muscled to choose an available
4996 TCP port to listen for incoming messages on.
4997 - Added a GetHumanReadableTimeValues() function to
4998 MiscUtilityFunctions.{cpp,h}. It's similar to
4999 GetHumanReadableTimeString(), except the results
5000 are returned as separate integers rather than as a String.
5001 - Added an optional "muscleSingleThreadOnly" bool argument to the
5002 ThreadSetupSystem and CompleteSetupSystem constructors. This
5003 flag lets you globally disable all Mutexes and other
5004 MUSCLE thread-safety mechanisms at run time. Useful if you
5005 need to compile your app without the MUSCLE_SINGLE_THREAD_ONLY
5006 compiler flag, but know (sometimes) at runtime that you will
5007 be running the process single-threaded...
5008 - Added a ChildProcessReadyToRun() hook method to the
5009 ChildProcessDataIO class. This method is called from inside
5010 the child process (except under Windows, which can't support it).
5011 - Added a GetSessionSelectSocket() convenience method to the
5012 AbstractReflectSession class.
5013 o ChildProcessDataIO now has a separate LaunchChildProcess()
5014 method, instead of launching the child process from inside
5015 the ChildProcessDataIO constructor.
5016 * Merged in Wilson Yeung's update to the C# client code --
5017 this update fixes an infinite-loop bug and makes flattening
5018 and unflattening of Message objects more efficient.
5019 * NetworkUtilityFunctions.cpp once again compiles under BeOS.
5020 * Incorporated Stephane Petithomme's patch to allow muscle
5021 to compile correctly under SunOS.
5022 * Merged in Monni's patches to GetSystemPath() so that it
5023 handles Windows Unicode paths correctly.
5024 * Replaced the Win32 implementation of GetCurrentTime64()
5025 with a more standard (read: accurate) implementation.
5026 * The Windows implementation of GetHumanReadableTimeValues()
5027 was not quite accurate. Fixed.
5028
5029 v2.62 Released 1/1/2005
5030 - Added a SetUDPSocketBroadcastEnabled() function to the
5031 NetworkUtilityFunctions API.
5032 - Added a broadcastIP constant declaration to NetworkUtilityFunctions.h
5033 - Updated the "listener" test program to send hex bytes that are
5034 entered on stdin, to make outgoing TCP connections as well as
5035 accepting incoming ones, and to be able to connect to an
5036 RS232 serial port, if desired. Renamed "listener" to "hexterm"
5037 to reflect its expanded functionality.
5038 - Added an AdoptBuffer() method to the ByteBuffer class, so that
5039 you can populate a ByteBuffer with a pre-existing array of bytes,
5040 if you are careful about memory-ownership issues..
5041 - Added a ChildProcessDataIO class, which is useful for spawning
5042 child processes and communicating with them interactively via
5043 their stdin/stdout streams. Works under POSIX, Windows, OS/X, and BeOS.
5044 - Added a RemoveANSISequences() function to MiscUtilityFunctions.{cpp,h}.
5045 This function strips all ANSI escape sequences from a given String.
5046 - Added a testchildprocess.cpp test to the test folder. This
5047 program is used to make sure ChildProcessDataIO works correctly.
5048 - Added a system/SystemInfo.{cpp,h} support API. These files contain
5049 a GetSystemPath() function (for locating various important directories
5050 on the host system), and a GetOSName() function that returns
5051 the name of the host operating system.
5052 o Adopted Jonas Sundström' simplified Makefile for muscled.
5053 * Updated the dev-c++/muscled.dev file to properly build muscled.exe again.
5054 * The included Python scripts are updated to raise exceptions using
5055 proper Exception objects, rather than old-style bare-string exceptions.
5056 * pythonchat.py now handles exceptions properly.
5057 * SharedMemory regions are now created with full permissions (0777)
5058 instead of just permissions for user and group (0770).
5059 * Worked around a gcc inline-assembly bug in the PowerPC assembly
5060 implementation of GetRunTime64(). (this bug would cause GetRunTime64()
5061 to sometimes return the wrong value if the MUSCLE_POWERPC_TIMEBASE_HZ
5062 compiler constant was defined)
5063 * Added some BeOS-compatibility tweaks to the RS232DataIO class.
5064 (I haven't really tested them to see if they work properly though)
5065
5066 v2.61 Released 11/04/2004
5067 - Added a CPULoadMeter class to the util subfolder. The CPULoadMeter
5068 class knows how to monitor the amount of CPU being used on your
5069 system. Handy for doing xload style status displays. Implemented
5070 for OS/X, Windows, and Linux only.
5071 - Added Jeff Koftinoff's Win32FileHandleDataIO class to the winsupport
5072 directory.
5073 - Added a "testtypedefs" test to the test folder. You can run this
5074 program to check that the MUSCLE typedefs (int8, int16, int32, etc)
5075 are correctly defined for your build environment.
5076 - Added SetMaxPoolSize() and GetMaxPoolSize() methods to the
5077 ObjectPool class.
5078 - Added a handy utility named "listener" to the test folder.
5079 This simple program just listens on a specified port and prints
5080 out (in hexadecimal) the bytes it receives from any connecting
5081 TCP client.
5082 - Added PLOCK() and PUNLOCK() macros to Mutex.h, and a new utility
5083 called deadlockfinder.cpp to the test subfolder. Together, these
5084 are useful for tracking down potential synchronization deadlocks in
5085 multithreaded programs. See test/deadlockfinder.cpp for details.
5086 * Added Peter Vorwerk's Tru64-compatibility patches.
5087 * Added Julien Torres' AMD64-compatibility patches.
5088 * Added an #ifdef to Thread.{cpp,h} so that the Thread class will
5089 compile properly with older (pre 3.2) versions of Qt.
5090 * Tweaked the code to again compile properly under BeOS/R5/PPC.
5091 * muscleFree now checks its argument for NULL-ness when memory
5092 tracking is disabled.
5093
5094 v2.60 Released 9/25/2004
5095 - Added in the initial implementation of the MiniMessage code.
5096 MiniMessage is a minimalist C-only implementation of the Message
5097 dictionary class, for use with C programs or C++ programs where
5098 simplicity and low resource usage is more important than flexibility
5099 and convenience. See the minimessage subfolder for details.
5100 - Added a Clear() method to the String class, for more efficient
5101 resetting of String objects.
5102 - Added a SetFromString() method to the String class, for more efficient
5103 copying of String objects. Changed the copy constructor and
5104 assignment operator to call this method instead of SetCstr().
5105 - Added a constructor to the String class that takes a String and
5106 a maximum length in characters.
5107 - Added HashtableIterator constructors that take the Hashtable to
5108 iterate over as an argument, which is more convenient and efficient
5109 than calling table.GetIterator()
5110 - Rewrote the HashtableIterator construction code to be more efficient.
5111 - Added a compiler flag MUSCLE_AVOID_ASSERTIONS. If you specify this
5112 flag in your Makefile, all MASSERT statements will become no-ops.
5113 - MuscleSupport.h is now parseable as a C header file (the C++ portions
5114 of this file will be #ifdef'd out when compiling as C). The non-C++
5115 inline functions in this file are now declared as 'static inline'
5116 to avoid linker problems when compiling C programs.
5117 o muscled is now compiled with optimizations enabled by default.
5118 To turn optimization off, compile muscled using 'make debug' instead.
5119 * Merged in Monni's patch to make the INT64_FORMAT_SPEC, the
5120 UINT64_FORMAT_SPEC, and the MCRASH_IMPL macros work correctly under
5121 Visual C++ 6.0.
5122 * Calling Destroy() more than once on a Python MessageTransceiverThread
5123 object would cause an exception to be thrown. Fixed.
5124
5125 v2.52 Released 8/13/2004
5126 - Added a GetInternalQThreadPriority() hook to the Qt implementation
5127 of the Thread class. This lets you specify the Thread priority
5128 of MUSCLE Threads launched from Qt programs, if you wish to.
5129 - Added a GetEmptyString() convenience function to the String class.
5130 This function returns a read-only reference to an empty string.
5131 * The Read() and Write() methods of the FileDescriptorDataIO class
5132 now return the correct values when used in blocking I/O mode.
5133 * Fixed a syntax error in Tuple::Replace() (thanks to Mika Lindqvist
5134 for bringing this to my attention).
5135 * Merged in Mika's patch to Message.cpp that fixes the template code
5136 so that it will compile without errors under gcc 3.4.1.
5137 * Rewrote the MuscleX86SwapInt64(), MuscleX86SwapDouble(),
5138 MusclePowerPCSwapInt64() and MusclePowerPCSwapDouble() inline
5139 assembly functions to work around problems with gcc's optimizer.
5140 * ParseArgs() now properly parses arguments with commas in them.
5141 * Integrated Wilson Yeung's fix for a race condition in the C# code.
5142
5143 v2.51 Released 6/27/2004
5144 - Wilson Yeung contributed an alpha version of a C# port of the Java
5145 client code (included in the "csharp" subdirectory). Thanks Wilson!
5146 - GetRunTime64() can now use the PowerPC time-base register,
5147 if running on a PowerPC CPU and you have #defined the compiler
5148 constant MUSCLE_POWERPC_TIMEBASE_HZ as the proper update rate.
5149 - Added SetMemoryAllocationStrategy() and GetMemoryAllocationStrategy()
5150 methods to the ByteBuffer class. You can call these to specify an
5151 IMemoryAllocationStrategy object that the ByteBuffer will use to
5152 allocate and free its buffers, instead of calling muscleAlloc() and
5153 muscleFree().
5154 - The PlainTextMessageIOGateway class now has SetFlushPartialIncomingLines()
5155 and GetFlushPartialIncomingLines() methods, to govern whether "orphan"
5156 incoming text without a carriage return should be passed to the owner
5157 immediately, or whether it should be buffered until the carriage return
5158 is read.
5159 - Added in Monni's QNX compatibility patches.
5160 * Calling SetGateway() or SetDataIO() from within a ClientDisconnected()
5161 callback now does the right thing, instead of just immediately
5162 disconnecting the newly installed gateway (or DataIO) object afterwards.
5163
5164 v2.50 Released 6/01/2004
5165 - If using gcc on a PowerPC or x86 target, inline assembly will be used
5166 in the B_SWAP_* byte swapping macros, which is more efficient than the
5167 traditional muscleSwapBytes() template function.
5168 * IsRegexToken() now also returns true when passed in any of the
5169 following characters: =^+${}:-
5170 * Removed the kludgy workaround from Mutex.h that simulated a recursive
5171 pthreads Mutex using an int counter, and replaced it with a proper
5172 PTHREAD_MUTEX_RECURSIVE Mutex. Note that the new code requires
5173 a UNIX98 compatible pthreads implementation -- under Linux, you
5174 may need to add -D_GNU_SOURCE to your Makefile in order to use this
5175 code.
5176
5177 v2.49 Released 5/07/2004
5178 - The "daemon" keyword now takes an optional argument specifying
5179 where the daemon process's stdout and stderr should be redirected
5180 to. If no argument is specified, /dev/null will be used by default.
5181 - Added support in the Thread class for a MUSCLE_USE_CLONE compile flag.
5182 If specified, this flag tells the Thread class to use Linux's clone()
5183 system call to create new threads, instead of the pthreads API. If
5184 this flag is defined, the method Thread::SetCloneParameters() is
5185 available to specify the child thread's launch flags and stack size.
5186 - Added SwapContents() methods to the Message, ByteBuffer, and Ref classes.
5187 o StorageReflectSession methods SetDataNode(), RemoveDataNodes(), and
5188 InsertOrderedData() are now virtual.
5189 o The (createIfNecessary) argument to SpawnDaemonProcess() and
5190 BecomeDaemonProcess() now defaults to true.
5191 o ServerComponent::IsAttachedToServer() is now public.
5192 * ParseArgs() now handles comment # marks inside quotes properly.
5193 * Fixed a couple of Win32 incompatibilities. Thanks to Monni
5194 for reporting these.
5195 * SysLog.cpp wouldn't compile under BeOS/PPC. Fixed.
5196 * QMessageTransceiverThread::event() is now public and not a slot.
5197 * ByteBuffer::SetNumBytes() wasn't updating number-of-valid-bytes
5198 value correctly when called with retainData=true. Fixed.
5199
5200 v2.48 - Released 3/17/2004
5201 - Added a GetGroupSize() accessor method to the
5202 SharedUsageLimitProxyMemoryAllocator class.
5203 - Added ParsePort() and ParseConnectArg() convenience methods to the
5204 MiscUtilityFunctions.{cpp,h} files. These functions let you
5205 easily parse values out of "port" and "hostname:port" arguments.
5206 - Added an IsCallerInternalThread() method to the Thread class.
5207 This method returns true iff it's being called from the internal
5208 Thread itself, or false otherwise.
5209 - Added GetOwnerSocketSet() and GetInternalSocketSet() methods to
5210 the Thread class. These let you customize the blocking behaviour
5211 of GetNextReplyFromInternalThread() and WaitForNextMessageFromOwner(),
5212 respectively.
5213 - Added a ParseArgs() method to MiscUtilityFunctions.{cpp,h}.
5214 This method knows how to parse multiple arguments from a line of text.
5215 o The Thread class now prefers to use the Windows threading API
5216 over Qt threading when, both are available.
5217 * Connect() now logs an appropriate error message if a hostname
5218 lookup fails and logging is enabled.
5219 * Rewrote LogLineCallback::Log() to be more robust (it now calls
5220 vsnprintf() instead of vsprintf() and does proper bounds checking)
5221 * Fixed a problem with Message.py's parsing of 64-bit Message fields.
5222 Thanks to pyCube for reporting this bug!
5223 * Cleaned up miscellaneous errors in the autodoc header comments.
5224
5225 v2.47 - Released 2/26/2004
5226 - The muscle code now supports a -DMUSCLE_AVOID_NAMESPACES compile
5227 flag that will cause all namespacing directives to be commented out.
5228 * Fixed an off-by-one error in String::SwapContents() that would cause
5229 memory corruption if the longer of the two strings contained 7 bytes.
5230 * The SetFromArchive() methods of the AndOrQueryFilter and
5231 the NandNotQueryFilter classes were broken. Fixed.
5232 * UDP didn't work in Windows, because sin_family wasn't being set. Fixed.
5233 * Fixed a bug that would cause ambiguities in the semantics of the
5234 PR_RESULT_DATAITEMS Message, if a subscribed database node was updated
5235 and then deleted immediately afterwards.
5236
5237 v2.46 - Released 1/27/2004
5238 - Added some UDP support: There is now a UDPSocketDataIO class, and the
5239 following new NetworkUtilityFunctions: CreateUDPSocket(), BindUDPSocket(),
5240 SetUDPSocketTarget(), SendDataUDP(), and ReceiveDataUDP().
5241 - Added some advisory timeslicing support to the PulseNode class. Now
5242 any PulseNode subclass can find out when its time-slice started, by
5243 calling GetCycleStartTime(), set a suggested time-slice-limit by calling
5244 SetSuggestedMaximumTimeSlice(), and check to see if that time limit is up
5245 by calling IsSuggestedTimeSliceExpired(). These methods can be used
5246 to help ensure consistent low latency to all clients.
5247 - Added a MathSetupSystem class (included in the CompleteSetupSystem class).
5248 This class disables BorlandC's floating point exceptions, to avoid
5249 crashing when a floating point exception occurs.
5250 - Added callback function arguments to CloneDataNodeSubtree(), to allow
5251 you to easily customize the Message payload of any nodes that it creates.
5252 - Added String::SwapContents() and Queue::SwapContents() methods for
5253 efficient (O(1)) state swapping between objects of these classes.
5254 - Added a HandleStandardDaemonArgs() function to MiscUtilityFunctions.
5255 This function parses command line arguments that are of general use.
5256 - Added a muscleSgn() convenience template function to MuscleSupport.h.
5257 o DisconnectSession() now returns a bool indicating whether or not
5258 the session decided to terminate itself.
5259 o Moved BecomeDaemonProcess() and SpawnDaemonProcess() from
5260 NetworkUtilityFunctions.{cpp,h} to MiscUtilityFunctions.{cpp,h}.
5261 o Rewrote muscledMain() to parse arguments using ParseArgs() and
5262 HandleStandardDaemonArgs(), rather than by looking at argv directly.
5263 o Rewrote Thread::InternalThreadEntry() to be cleaner.
5264 o Rewrote String::Replace() to be much more efficient. Also, it now returns
5265 the number of substring replacements done, rather than an error code.
5266 * Failed asynchronous-connect-attempts instigated by a call to
5267 AddNewConnectSession() were not being detected under Windows. Fixed.
5268 * Calling AbstractReflectSession::Reconnect() from inside the
5269 AbstractReflectSession::ClientConnectionClosed() method now works properly.
5270 * Calling AddNewSession(ref, int) with an AbstractReflectSession that
5271 already had a DataIO object installed would cause the pre-installed
5272 DataIO object to be deleted and replaced. Now the pre-installed
5273 DataIO object is retained, instead.
5274 * SharedMemory::SetArea() with a zero createSize parameter now works
5275 correctly under Windows.
5276
5277 v2.45 - Released 11/10/2003
5278 - Added GetNextKeyAndValue() convenience methods to the Hashtable class.
5279 - Added an Atoll() function to MiscUtilityFunctions, to complement
5280 the already included Atoull() function.
5281 - Added a Pad() convenience method to the String class, for easy
5282 padding of a string to a given minimum length.
5283 - Added SetSocketSendBufferSize() and SetSocketReceiveBufferSize()
5284 functions to the NetworkUtilityFunctions function collection.
5285 - Added a ConvertReturnValueToMuscleSemantics() function to MuscleSupport.h,
5286 and modified the various DataIO classes to call this function instead of
5287 each one reimplementing the conversion-logic separately.
5288 - Added QString-style Arg() methods to the String class, so that numeric values
5289 can be inserted into strings in a convenient and relatively safe manner.
5290 o Moved the PreviousOperationWouldBlock() and PreviousOperationWasInterrupted()
5291 functions from NetworkUtilityFunctions.h to MuscleSupport.h, since they
5292 weren't really networking-specific.
5293 o Moved the %llu's and %lli's into MuscleSupport.h constants
5294 INT64_FORMAT_SPEC and UINT64_FORMAT_SPEC, so that they are
5295 defined correctly for different compilers (some expect %Lu instead).
5296 * GetRunTime64() now contains a work-around for a bug in Windows'
5297 QueryPerformanceCounter() function that would cause time to "skip ahead"
5298 under certain motherboard chipsets. See system/SetupSystem.cpp for details.
5299 * Under Windows, GetCurrentTime64() was returning microseconds-since-1601.
5300 Fixed it to return microseconds-since-1970, as documented.
5301 * GetCurrentThreadId() was misspelled in Win32Support.h. Fixed.
5302 * Renamed the SWAP_* macros to B_SWAP_*, for consistency with the
5303 naming convention used in the other macros.
5304 * The FileDescriptorDataIO class now handles EINTR and EWOULDBLOCK
5305 return values appropriately, instead of erroring out.
5306
5307 v2.44 - Released 09/15/2003
5308 - The QAcceptSocketsThread and QMessageTransceiverThread constructors
5309 now take optional parent and name arguments, which are passed on to the
5310 QObject constructor.
5311 - The QAcceptSocketsThread and QMessageTransceiverThread destructors
5312 now call ShutdownInternalThread(), so you no lnoger have to call it
5313 yourself if you don't want to.
5314 - Added a setNotifyOutputQueueDrainedTag() method to MessageTransceiver.java,
5315 so that the user thread can be notified when the output queue drains.
5316 Thanks to Bryan Varner for this code.
5317 - Added a Replace() method to the Tuple class.
5318 * Some of the SetFromArchive() calls in MultiQueryFilter and its
5319 subclasses didn't mark their argument as const. Fixed.
5320 * Queue::AddTail(const ItemType *, uint32) was broken. Fixed.
5321 * Removed reference to QEvent::MaxUser from the QMessageTransceiverThread
5322 class, so that it can be compiled against Qt 2.3.
5323 * Replaced calls to QThread::postEvent() with QApplication::postEvent().
5324
5325 v2.43 - Released 08/19/2003
5326 - Added an optional (count) argument to String::Append() and
5327 String::Prepend().
5328 - Added a DisconnectSession() method to the AbstractReflectSession class.
5329 Calling this method force-disconnects the session's TCP connection.
5330 - PR_COMMAND_SETDATA now processes multiple sets to the same node in
5331 a single Message.
5332 - Added a (numPreallocSlots) argument to the Queue::EnsureSize() method,
5333 so you can specify how many extra slots to preallocate in the event
5334 of an array reallocation.
5335 - Added SetSignalHandle(), SetSignalValue(), and SetReplyThreadID()
5336 methods to the Win32MessageTransceiverThread class.
5337 * Fixed a bug in Hashtable::Clear() that could cause crashes under
5338 certain circumstances (iterators weren't being unregistered reliably).
5339 * Fixed a bug in the Queue class that was disabling queue-slot-preallocation,
5340 making calls to AddHead() and AddTail() inefficient -- O(N) instead
5341 of amortized O(1). Oops!
5342 * The Win32 implementation of GetHumanReadableTimeString() was returning
5343 date strings 369 years too early. Fixed.
5344
5345 v2.42 - Released 7/15/2003
5346 o DebugTimer's default minimum-print time is now 1000 (1 millisecond)
5347 o DeflateMessage()'s force parameter now defaults to true.
5348 * Fixed a bug in PathMatcher::MatchesPath() that would cause absolute
5349 paths to not be matched correctly. Thanks to VitViper and Monni for
5350 reporting this bug!
5351 * ReflectServer::GetServerUptime() was broken. Thanks to Monni
5352 for finding this bug!
5353 * The first call to Queue::EnsureSize() no longer does an implicit doubling
5354 of the initial array size, since it's likely that the caller to EnsureSize()
5355 has the best idea of how many slots are needed, and thus shouldn't be
5356 second-guessed.
5357
5358 v2.41 - Released 6/27/2003
5359 - Added an sdlsupport folder with Shard's SDLMessageTransceiverThread class
5360 in it. This class interfaces MUSCLE to the SDL game library. Thanks Shard!
5361 - Added a PRINT_CALLS_PER_SECOND macro to TimeUtilityFunctions.h
5362 - Added a PreviousOperationWasInterrupted() function to NetworkUtilityFunctions.h
5363 - ZLibCodec::GetInflatedSize() now takes an optional second argument which
5364 can be used to find out if the given compressed buffer is independent or not.
5365 - Added ZLibUtilities.{cpp,h} to the zlib folder. This file contains
5366 InflateMessage() and DeflateMessage() functions that are handy for
5367 compressing Messages down into a flattened state for efficient storage.
5368 - Added a muscleRealloc() function to GlobalMemoryAllocator.h, to go with
5369 the already existing muscleAlloc() and muscleFree() functions.
5370 - The String and ByteBuffer classes now use muscleRealloc() when
5371 appropriate, to avoid unnecessary data copying while resizing buffers.
5372 - Added a minimum-log-time argument to the DebugTimer class so that
5373 printing of very small time intervals can be suppressed.
5374 - Added a GetNumPreallocatedSlots() accessor method to Hashtable.
5375 - Added GetHumanReadableTimeString() and ParseHumanReadableTimeString()
5376 functions to util/MiscUtilityFunctions.h. These functions convert uint64
5377 time values to ASCII "YYYY/MM/DD HH:MM:SS" strings, and vice versa.
5378 o SetupSystem's constructor is now protected, to make sure nobody declares
5379 a SetupSystem object by itself (they should use CompleteSetupSystem instead)
5380 o Removed the (copyBuffer) argument from the ByteBuffer constructor and
5381 several associated methods, because it was error prone and not
5382 very useful.
5383 * Fixed a crashing bug in Queue.AddHead(const Queue &)
5384 * SharedUsageLimitProxyMemoryAllocator::AllocationFailed() was broken. Fixed.
5385 * String::SetCstr() would store bytes past the NUL terminator of the passed-in
5386 string if (maxLen) was too large. Fixed.
5387 * Made String::Substring() is more efficient, and it now handles
5388 out-of-range values gracefully, instead of throwing an assertion failure.
5389 * The String constructor and SetCstr() took an int32 for (maxLen).
5390 Now they take a uint32 instead.
5391 * Replaced calls to CreateThread() with calls to _beginthreadex() in the
5392 Win32 implementation of the RS232DataIO and Thread APIs.
5393 * The (independent) flag to ZLibCodec::Deflate() wasn't working properly.
5394 Fixed. (The ZLibCodec header format has also changed slightly)
5395
5396 v2.40 - Released 6/2/2003
5397 - MUSCLE is now licensed under the standard BSD Open Source License.
5398 (Previously it used an equivalent but non-standard license)
5399 - Added the optional zlib compression library to the MUSCLE archive.
5400 (Add -DMUSCLE_ZLIB_ENCODING_ENABLED to your Makefile to enable it)
5401 - Added 9 levels of ZLib encodings to the MessageIOGateway class
5402 (MUSCLE_MESSAGE_ENCODING_ZLIB_1, ..., MUSCLE_MESSAGE_ENCODING_ZLIB_9)
5403 - Added QueryFilter objects (regex/QueryFilter.{cpp,h}) to allow queries
5404 to be restricted to include only nodes whose data Messages match
5405 user-specified criteria.
5406 - Rewrote the PathMatcher class and API to support QueryFilter objects.
5407 - Added a PR_NAME_FILTERS keyword that can be added to commands (along
5408 with PR_NAME_KEYS) to restrict results based on a QueryFilter.
5409 - Added a QueryFilterRef parameter to the SendMessageToMatchingSessions(),
5410 FindMatchingSessions(), and RemoveDataNodes() methods of the
5411 StorageReflectSession class.
5412 - Rewrote the MessageIOGateway implementation and protected API to
5413 use ByteBuffers, in order to better support ZLib encoding.
5414 - Added a PR_NAME_REPLY_ENCODING parameter to StorageReflectConstants.
5415 This parameter can be used to tell muscled to compress Messages that
5416 it sends back to your client.
5417 - Added a SetOutgoingMessageEncoding() method to the
5418 MessageTransceiverThread class.
5419 - Added a GetRunTime64() function to TimeUtilityFunctions.h. This
5420 function is similar to GetCurrentTime64(), except it is not synced
5421 to the real-time clock, and thus is guaranteed not to jump around
5422 (e.g. when the user sets the system clock, or during leap-seconds)
5423 GetRunTime64() is now used instead of GetCurrentTime64() where appropriate.
5424 - Added a Reset() method to all the AbstractMessageIOGateway classes,
5425 so that they can be re-used after a disconnect or parse error.
5426 - Merged in Bryan Varner's enhancements to the Java muscle code.
5427 These include a new Preferences wrapper class, and non-exception
5428 throwing get*() methods in Message class. Thanks, Bryan!
5429 - Calls to the installed LogCallbacks are now checked so that
5430 re-entrant calls (read: infinite recursion) cannot occur.
5431 - StorageReflectSession::SendMessageToSessions() and
5432 StorageReflectSession::FindMatchingSessions() now take
5433 a (matchSelf) boolean argument.
5434 - Optimized the Hashtable class to be a bit more efficient.
5435 - Added an AddPathFromString() convenience method to the PathMatcher class.
5436 - Added a muscleVoidPointer convenience typedef to MuscleSupport.h
5437 - Added IsReadyForInput() and HasBytesToOutput() methods to the
5438 AbstractReflectSession class; ReflectServer now calls these,
5439 and the default implementations pass the calls through to the gateway.
5440 - Added a GetOrPut() convenience method to the Hashtable class.
5441 (handy for demand-allocated Hashtable entries)
5442 - ByteBuffers no longer re-allocate their memory buffer when
5443 they are resized smaller.
5444 - Added DebugTimer.{cpp,h} to the utils subfolder. This class
5445 is useful for quick-and-dirty profiling of code execution times.
5446 - Added a GetTimeSliceElapsedTime() method to the ServerComponent
5447 class, so that sessions and factories can see how much time
5448 they have taken so far in their current cycle iteration.
5449 - Added an EnsureSize() method to the Hashtable class, to support
5450 pre-allocating tables (for efficiency).
5451 - Added item-array implementations of AddHead() and AddTail()
5452 to the Queue class.
5453 - Added optional startIndex and numItems arguments to the Queue-arg
5454 implementations of AddHead() and AddTail() in the Queue class.
5455 - Updated the Beginner's Guide HTML to document QueryFilters,
5456 ZLib encoding parameters, and a few other details that had
5457 been left out of it.
5458 o Moved the ByteBufferPool functions from Message.{cpp,h} to
5459 ByteBuffer.{cpp,h}.
5460 o Demoted certain log messages from MUSCLE_LOG_INFO priority
5461 to MUSCLE_LOG_DEBUG priority.
5462 o Adjusted the DECLARE_MUSCLE_TRAVERSAL_CALLBACK macro to make
5463 it more reusable in StorageReflectSession subclasses.
5464 o The ByteBuffer class now refers to its data as an array of uint8's,
5465 rather than using void pointers.
5466 * RateLimitIOSessionPolicy would divide by zero if you
5467 specified a rate limit of zero bytes per second. Fixed.
5468 * RS232DataIO::GetAvailableSerialPortNames() now works correctly
5469 under MacOS/X.
5470 * Fixed a couple of VC++-specific code problems.
5471 * Fixed a bug that was causing Messages sent to a
5472 MessageTransceiverThread to be sent back to the user thread.
5473 * StorageReflectSession::FindMatchingSessions() was broken. Fixed.
5474
5475 v2.31 - Released 4/14/2003
5476 - Rewrote the Hashtable class so that it no longer needs to
5477 allocate HashtableEntries dynamically during hash clashes.
5478 - Added in a remapping layer to the HashtableEntries so that
5479 Hashtable operations can be efficient even when the Hashtable
5480 is full or nearly full. Removed the (loadFactor) argument to
5481 the Hashtable constructor.
5482 - Lowered the Hashtable's default (initialCapacity) to 7.
5483 - Added some new optional parameters to StorageReflectSession's
5484 SetDataNode() and CloneDataNodeSubtree() methods to allow for
5485 more control over how nodes get placed into their parent's index.
5486 - Added muscleAlloc() and muscleFree() calls to the
5487 GlobalMemoryAllocator.h API, for those who like C-style
5488 memory management.
5489 - Added GetArrayPointer() methods to the Queue class. This
5490 enables efficient bulk-manipulation of items in the Queue.
5491 - Added an optional node-name argument to DataNode::InsertOrderedChild().
5492 - Added an optional "releaseDataBuffers" argument to the Clear()
5493 methods of Queue, Hashtable, and Message classes, to force
5494 the immediate release of internally held memory buffers.
5495 - Added GetNumAllocatedItemSlots() method to the Queue class.
5496 - Added a muscleRintf() function to MuscleSupport.h
5497 - Added a Win32MessageTransceiverThread class to the winsupport
5498 folder. This subclass interfaces the MessageTransceiverThread
5499 class to the Win32 event API.
5500 - Added support for MUSCLE_DISABLE_DEBUGGING compile-time
5501 flag to turn all Log(), LogTime(), etc calls into no-ops.
5502 - Added a GetGlobalMuscleLock() function that returns a process-wide
5503 Mutex for simple serialization of Log operations, etc.
5504 - Added an argument for enabling Nagle's algorithm to
5505 CreateConnectedSocketPair(). Defaults to false/disabled.
5506 - Added a GetPosition() method to the DataIO interface and
5507 all subclasses thereof.
5508 * Fixed a bug in RestoreNodeTreeFromMessage() that would
5509 sometimes cause indexed nodes not to be restored.
5510 * Fixed a bug in Queue::EnsureSize(x, true) where sometimes it
5511 _itemCount wouldn't be properly set after a successful call.
5512 * Some of the byte-order-swap macros weren't handling complex
5513 arguments correctly. Added extra parentheses to fix them.
5514 * Added support for a -DMUSCLE_AVOID_NEWNOTHROW flag that will
5515 tell all MUSCLE code to use new instead of new (nothrow).
5516 * Trim() will no longer strip UTF8 chars from the end of a String.
5517 * Fixed a bug in the RateLimitSessionIOPolicy that would cause
5518 rate-limited transfers to occasionally stall. Thanks to
5519 Garjala for all his help in tracking this problem down!
5520 * Sessions that are about to be destroyed now have DoOutput()
5521 called on them, in case they have any last-second data to send.
5522 * Muscle now includes <new> instead of <new.h> to avoid gcc warnings.
5523 * MessageIOGateway::DoInputImplementation() would sometimes hold
5524 on to a large memory buffer instead of freeing it immediately. Fixed.
5525 * muscleAbs() was returning int instead of the templated type. Fixed.
5526
5527 v2.30 - Released 3/03/2003
5528 - Added a SharedMemory class to the system folder. This class
5529 acts as a platform-neutral wrapper API for the host OS's
5530 cross-process-shared-memory-area facilitities.
5531 - Rewrote the MemoryAllocator API to be more flexible.
5532 - ReflectServer's constructor now takes a MemoryAllocator
5533 pointer instead of a UsageLimitProxyMemoryAllocator pointer.
5534 - Added a SharedUsageLimitProxyMemoryAllocator class that
5535 uses a small shared memory area to allow multiple daemon
5536 processes to share a single aggregate memory-usage cap.
5537 - Added a Reconnect() method to the AbstractReflectSession
5538 class. This lets a session that was added with
5539 AddNewConnectSession() restore his connection if it breaks.
5540 - Added a GetSessionDescriptionString() method to the
5541 AbstractReflectSession class, for convenience.
5542 - Added GetAsyncConnectIP() and GetAsyncConnectPort()
5543 methods to AbstractReflectSession, for convenience.
5544 - Added a FindMatchingSessions() method to the
5545 StorageReflectSession class, for convenience.
5546 - GetPathDepth() now handles paths without a leading slash correctly.
5547 - Added SetSocketNaglesAlgorithmEnabled(), ShutdownSocket(),
5548 SendData(), ReceiveData(), and PreviousOperationWouldBlock()
5549 to the NetworkUtilities function collection.
5550 - Added IsBlockingIOEnabled() and IsNaglesAlgorithmEnabled()
5551 accessor methods to the TCPSocketDataIO class.
5552 - Added the AbstractGatewayMessageReceiver interface, and the
5553 QueueGatewayMessageReceiver convenience class.
5554 - Rewrote ReflectServer::ServerProcessLoop() to be slightly
5555 more efficient and fair.
5556 - Added a (void *) misc-utility argument to the
5557 MessageReceivedFromGateway() method, and made it part of
5558 the AbstractGatewayMessageReceiver interface.
5559 - Added testnagle.cpp and testresponse.cpp to the test folder.
5560 o Inet_NtoA() no longer returns a String object, since that
5561 requires the String class to be linked in to programs that
5562 could otherwise live without it.
5563 o Rewrote the AbstractMessageIOGateway API to be more efficient.
5564 Gateways no longer maintain a Queue of incoming Messages; rather,
5565 whenever they parse a Message they immediately pass it to a
5566 specified AbstractGatewayMessageReceiver object.
5567 o AbstractMessageIOGateway subclasses no longer override DoInput()
5568 and DoOutput() directly. Instead, they should implement/override
5569 DoInputImplementation() and DoOutputImplementation().
5570 o Moved the StringMatcher and StringMatcherQueue singleton
5571 ObjectPools out of the StorageReflectSession class and into
5572 the StringMatcher.cpp and PathMatcher.cpp files, respectively.
5573 They can now be accessed anywhere, via the functions
5574 GetStringMatcherPool() and GetStringMatcherQueuePool().
5575 o PathMatcher no longer accepts pointers to ObjectPools in its
5576 AddPathString() methods -- instead it just always uses
5577 the appropriate singleton ObjectPools.
5578 o Removed the type_code data type; now uint32 is used instead.
5579 o Removed the PulseNode::Tick() method hook, since it turned
5580 out to be unnecessary and encourages bad programming habits.
5581 * ReflectServer's status output is now more informative.
5582 * The ThreadSetupSystem and NetworkSetupSystem classes now
5583 handle multiple nested instantiations gracefully.
5584 * TCPSocketDataIO's Read() and Write() calls would return an
5585 error code for zero-length reads or writes. Fixed.
5586 * PathMatcher::MatchesPath() wasn't giving correct results
5587 for paths with leading slashes. Fixed.
5588 * TCPSocketDataIO::FlushOutput() wasn't working in OS/X. Fixed.
5589
5590 v2.25 - Released 2/04/2003
5591 - Renamed Hashtable::Get() to GetValue() (Get() is preserved
5592 as a synonym for compatibility with existing code)
5593 - Added two Hashtable::GetKey() methods to allow quick lookup
5594 of held key objects.
5595 - Added a PrintStackTrace() function to the SysLog module.
5596 MCRASH() and MASSERT() now call PrintStackTrace() so you
5597 get more debug info when you crash. (Only works under gcc)
5598 - Added a (setNumItems) argument to Queue::EnsureSize(), which
5599 can be handy if you want to add or remove a large number of
5600 default data items at once.
5601 - Updated MessageTransceiver.java with Bryan Varner's changes.
5602 - Hashtable::Sort() now uses Simon Tatham's very efficient
5603 merge-sort algorithm instead of insertion sort.
5604 - Added ToString() and AddToString() methods to the Message class.
5605 - Added a SetCstr() method to the String class.
5606 * binary String operators now return String instead of const String.
5607 * StorageReflectSession::CloneDataNodeSubtree() was not
5608 cloning node indices. Fixed.
5609 * DataNode::InsertIndexEntryAt() now uses GetKey() so as not
5610 to have to iterate over the node's child list.
5611
5612 v2.24 - Released 11/15/2002
5613 - Added an "oldData" argument to StorageReflectSession's
5614 NotifySubscribersThatNodeChanged() and NodeChanged() methods,
5615 and removed the NodeCreated() and NotifySubscribersOfNewNode()
5616 methods (since they are now redundant).
5617 - Added a "backwards" flag argument to Message::GetFieldNameIterator(),
5618 and added a Message::GetFieldNameIteratorAt() method.
5619 - Added a GetBlankMessage() convenience method to the
5620 StorageReflectSession class. This method returns a reference to
5621 an empty Message.
5622 - Optimized the tree search traversal algorithm so that non-wildcard
5623 patterns do a single hash lookup instead of matching against every
5624 child node.
5625 - Added GetPattern() and IsPatternUnique() methods to the
5626 StringMatcher class.
5627 - StringMatcher::SetPattern and the StringMatcher constructor
5628 now take a (const String &) instead of a (const char *).
5629 - Merged in Bryan's enhancements the the Java classes. The
5630 Jave MUSCLE API now includes better support in the
5631 MessageTransceiver class for listening for incoming TCP
5632 connections, and a way to interrupt() the current Thread
5633 running in a MessageQueue.
5634 - String::Replace() now returns a status_t to indicate whether
5635 any replacements were actually made or not.
5636 * QMessageTransceiverThread was using an illegal event code to
5637 signal the master thread of new network events. Fixed.
5638
5639 v2.23 - Released 11/01/2002
5640 - Added RS232DataIO.{cpp,h} to allow for simple serial port I/O.
5641 Currently it only works under Windows and Linux; support for
5642 other OS's may be added in the future, if there is need for it.
5643 - Exposed the AddPyObjectToMessage() function in the Python
5644 argument-conversion-utilities package.
5645 * Cleaned up the various comparison operators to return bool
5646 instead of int, and the equality-adjustment operators to
5647 return (Class &) instead of (const Class &)
5648 * Tweaked the code to compile cleanly under gcc 3.x.
5649
5650 v2.22 - Released 10/16/2002
5651 - Added PR_COMMAND_SETDATATREE, PR_COMMAND_GETDATATREE,
5652 and PR_JETTISON_SUBTREES commands, and a PR_RESULT_DATATREE
5653 reply. These can be used to conveniently get and set
5654 database subtrees.
5655 - MessageGateways now free their scratch buffers if they
5656 are bigger than 10 kilobytes, so as not to waste memory after
5657 having sent or received a very large Message.
5658 * Integrated Monni the Cat's VC++6 compatibility tweaks.
5659 * Fixed a horrendously embarrassing memory leak in muscled.
5660 In fact, ALL of muscled's heap memory allocations were being
5661 leaked, as of v2.18. Sorry guys, that was a really dumb
5662 mistake. :^(
5663
5664 v2.21 - Released 10/08/2002
5665 - Added a muscleAbs() utility template to MuscleSupport.h
5666 - Queue::RemoveItemAt() and Queue::InsertItemAt() have been
5667 optimized a bit -- they should be about twice as fast now.
5668 - Added a GetLogLevelKeyword() function to SysLog.h
5669 - StringMatcher::SetPattern() now looks for an optional tilde
5670 character ('~') at the beginning of simple patterns; if it
5671 finds it, it sets a negate flag so that Match() will return
5672 the logical opposite of what it usually would return.
5673 - Added manual SetNegate() and IsNegate() methods to the
5674 StringMatcher class.
5675 - IsRegexToken() now takes a second argument specifying whether
5676 the character in question is the first in the string (since
5677 there are several characters that are only 'special' when they
5678 are the leading character)
5679 - Database node paths are no longer cached, to save memory.
5680 Instead, GetNodePath() now generates the node-path on the fly,
5681 as needed. Because of this, the function signatures of
5682 GetNodePath() and GetNodeName() have changed.
5683 - Added a handy DataNode::GetPathClause() method that allows
5684 quick access to the node name at a specified depth in
5685 a node's path.
5686 * Queue::GetItemPointer() is now named GetItemAt(). (The old
5687 name is still available, but deprecated).
5688 * The PowerPC assembly implementation of atomic increment and
5689 decrement wasn't being used under OS/X. Fixed.
5690
5691 v2.20 - Released 9/05/2002
5692 - Added a () convenience operator to the MessageFieldNameIterator
5693 class. It operates as a synonym for GetNextFieldNameString().
5694 - Added PythonUtilityFunctions.{cpp,h}, which currently includes
5695 two functions, ConvertMessageItemToPyObject(). and
5696 ParsePythonArgs(). These are useful when embedding Python
5697 and MUSCLE C++ code into the same application.
5698 - Added ParseArg() and ParseFile() methods to MiscUtilityFunctions
5699 .cpp and .h files. These parse an argument (ParseArgs()) style
5700 out of a single string, or a FILE pointer, respectively.
5701 - Added a GetScheduledPulseTime() to the PulseNode class. This
5702 method returns the time at which Pulse() will next be called.
5703 - Added a muscleCompare template that returns -1 if the first arg
5704 is greater than the second, or 0 if they are equal, or else 1.
5705 - Added an Atoull() function to turn an ASCII string into a uint64.
5706 (useful since atoll() and atoull() aren't standard functions)
5707 - Added a SendMessageToMatchingSessions() convenience method to
5708 the StorageReflectSession class.
5709 - Added a dev-c++ subfolder that contains project files suitable
5710 for compiling muscled under Windows' Dev/C++ IDE. (Thanks
5711 to Marcin "Shard" Konicki for supplying these!)
5712 - Added inline x86 assembly atomic-increment and atomic-decrement
5713 code to AtomicCounter.h.
5714 - Added a "remap" argument to muscled, and corresponding accessor
5715 methods to ReflectServer, to support explicit remapping of IP
5716 addresses (e.g. so you can tell muscled to advertise local LAN
5717 machines by their world-accessible IP address)
5718 * AtomicCounter.h no longer relies on the (non-portable)
5719 asm/atomic.h API when compiled under Linux.
5720 * ParseArgs() now parses argv[0] as well as the others.
5721 * BeOS/net_server bone-check in FinalizeAsyncConnection() now uses
5722 be_roster->IsRunning() if possible for more accurate results on
5723 systems where BONE has been installed and then disabled.
5724 * Fixed a bug that would cause an assertion failure if you called
5725 ReverseItemOrdering() on an empty Queue.
5726 * StringMatcher's wildcard-to-regex code was overly complicated
5727 and broken, especially when using the included regex parser (i.e.
5728 under Windows). Rewritten to be simpler and work right.
5729 * When set to a numeric-range pattern like "<0-50>", StringMatcher
5730 now only considers matches on strings that start with a digit.
5731
5732 v2.19 - Released 7/22/2002
5733 - Added a GetPathClauseString() method to PathMatcher.{cpp.h}.
5734 This version returns a String object containing just the one
5735 clause you specified.
5736 * GetPathClause() was not returning NULL on failure. Fixed.
5737 * When presented with an unknown hostname, MessageTransceiverThread
5738 would sometimes try to connect to IP address 0.0.0.0 instead of
5739 failing cleanly. Fixed.
5740 * The NodeCreated() callback would see the newly created node with
5741 an empty Message payload. Now it sees the node complete with the
5742 Message it was created to have.
5743 * The Win32 implementation of Thread::StartInternalThreadAux() wasn't
5744 handling the return value of CreateThread(), which in turn caused
5745 Thread::ShutdownInternalThread() to not work properly. Fixed.
5746 (Thanks to VitViper for detecting this bug!)
5747 * The BeOS/net_server implementation of FinalizeAsyncConnection()
5748 would cause net_server to half-close the connection after 60
5749 seconds if no send or receive activity had occurred by then. Fixed.
5750
5751 v2.18 - Released 7/4/2002
5752 - Removed checks for DISABLE_MUSCLE_MEMORY_TRACKING, and put in
5753 checks for MUSCLE_ENABLE_MEMORY_TRACKING instead. In other words,
5754 memory tracking is now disabled unless the Makefile says otherwise.
5755 The muscled Makefile contains -DMUSCLE_ENABLE_MEMORY_TRACKING, so
5756 memory tracking is enabled by default for muscled.
5757 - Added two GetNumInstancesOf() methods to the String class; these
5758 are handy for counting how many instances of a substring are
5759 present in a String.
5760 - DefaultConsoleLogger now calls fflush() after every call to printf().
5761 - Added a Reverse() method to the String class.
5762 - Added a muscleInRange() function template to MuscleSupport.h
5763 This function tests whether a given value is within a given range.
5764 * The 'maxmem' argument is no longer parsed if muscled was compiled
5765 without -DMUSCLE_ENABLE_MEMORY_TRACKING.
5766 * The '==' operator of the Message class had a bug in which
5767 Messages would sometimes be wrongly reported as equivalent
5768 when they weren't. Fixed.
5769 * Message class now holds its fields using a table of GenericRefs
5770 instead of AbstractDataArrayRefs (to avoid errors under compilers
5771 that don't like creating templates for declared-but-undefined classes)
5772 * The MemoryAllocator class hierarchy has been rewritten so that it
5773 no longer allocates or frees memory directly; rather it is used only
5774 to monitor and/or veto memory requests called in by the new and delete
5775 operators. This makes it work better with the constructors and
5776 destructors of static objects, and fixes a crash-on-exit bug in
5777 muscled.
5778 * Folded in Charlie Buckheit's SGI compatibility changes into the
5779 muscled Makefile, made the Makefile simpler, and added comments.
5780
5781 v2.17 - Released 6/14/2002
5782 - Message class now uses ObjectPools to cache extra AbstractDataArray
5783 objects, to avoid having to dynamically allocate them most of the
5784 time. You can define MUSCLE_DISABLE_MESSAGE_FIELD_POOLS to suppress
5785 this behaviour, if you need to.
5786 - AtomicCounter now uses inline assembly to implement atomic operations
5787 on the PowerPC processor with gcc, and the asm/atomic.h functions when
5788 under Linux/Intel.
5789 - Added '==' and '!=' operators to the Message class.
5790 - Modified Head() and Tail() in the Queue class to return read-only
5791 or read-write references to the head or tail items, instead of
5792 doing return-by-value.
5793 - Added PeekNextFieldNameString() and GetNextFieldNameString() methods
5794 to the MessageFieldNameIterator class. These return a (const String *)
5795 instead of a (const char *), which is sometimes more efficient.
5796 * MessageFieldNameIterator::PeekNextFieldNameString() was broken. Fixed.
5797 * AtomicCounter::AtomicIncrement() and RefCountable::IncrementRefCount()
5798 now return void instead of bool (Linux doesn't support returning bool)
5799
5800 v2.16 - Released 6/5/2002
5801 - Added SetNewInputPolicy(), SetNewOutputPolicy(), and
5802 RemoveSessions() methods to the MessageTransceiverThread class.
5803 These methods allow for some on-the-fly control of existing
5804 ThreadWorkerSessions.
5805 - Added comparison operators (less than, greater than, etc)
5806 to the Tuple class template. These do a lexical comparison
5807 using the comparison operators of each sub-element, in sequence.
5808 - syslog/SysLog.h now looks for a MUSCLE_MINIMALIST_LOGGING
5809 preprocessor constant. If found, Log(), LogTime(), and LogFlush()
5810 will be defined as simple in-line pass-throughs to printf().
5811 This allows small programs to use MUSCLE classes without having
5812 to link in all the stuff that the regular logging facility
5813 requires.
5814 - Added GetKeyAt() and IndexOfKey() methods to the Hashtable class.
5815 - Added two Substring() convenience methods to the String class,
5816 that take a String as an argument.
5817 - Added a GetNumInstancesOf() method to the Tuple class.
5818 * To ensure logical correctness, all methods in the Hashtable class
5819 that used to return (Key *) now return (const Key *).
5820 * Folded in VitViper's Visual C++ compatibility fixes.
5821
5822 v2.15 - Released 5/17/2002
5823 - The Hashtable class now uses a HashFunctor template argument
5824 to calculate hash codes, instead of a function callback. This
5825 allows for more efficient code, but will break some source
5826 code (sorry!). To fix the souce, you typically just need to
5827 remove the function pointer argument to the Hashtable ctor.
5828 - Broke out the log-line-label-generation code in SysLog.cpp
5829 into its own separate function, GetStandardLogLinePreamble(),
5830 so that it can be accessed independently by other code.
5831 - Changed the Hashtable class's performance parameters to
5832 capacity=11, loadFactor=75%. This should save some memory.
5833 - Added an AfterMessageReceivedFromGateway() callback method
5834 to the AbstractReflectSession class. PushSubscriptionMessages()
5835 is now called by this method, rather than having to be
5836 called manually by the subclasses.
5837 - Added a CallMessageReceivedFromGateway() method to the
5838 AbstractReflectSession class. This method calls both
5839 MessageReceivedFromGateway() and AfterMessageReceivedFromGateway(),
5840 and should be used to 'fake' message reception (instead of
5841 calling the aforementioned methods directly).
5842 - Optimized the PushSubscriptions() method with a dirty-flag.
5843 - Added the muscleCopyIn() and muscleCopyOut() templates to
5844 MuscleSupport.h. These support alignment-safe value copying.
5845 - Added a GetEmptyMessage() utility function to Message.{cpp,h}
5846 - ObjectPool now derives from AbstractObjectManager, which in
5847 turn derives from AbstractObjectGenerator and AbstractObjectRecycler.
5848 This helps me use pools polymorphically.
5849 * The ServerComponent detach/delete sequence is now better defined,
5850 avoiding possible errors that could occur in custom servers.
5851 * A little more OS/X compatibility tweaking.
5852 * Some of the Flatten/Unflatten code would crash on processors
5853 (e.g. MIPS) that required values to be read on written on
5854 word-aligned boundaries. Fixed. (Thanks to Charlie Buckheit
5855 for reporting this bug)
5856 * Fixed a race condition in the Thread class that would cause
5857 the thread's owner to not be signalled correctly in some cases.
5858
5859 v2.14 - Released 5/2/2002
5860 * The Python Message implementation now flattens/unflattens
5861 B_INT64_TYPE fields properly even under old (pre 2.2) versions
5862 of Python.
5863 * Bryan Varner found and fixed a bug in the Java Message class;
5864 it wasn't handling the sending and receiving of UTF8 strings
5865 correctly. Thanks Bryan!
5866 * Removed the B_POINTER_TYPE from the Java Message implementation,
5867 since Java doesn't have pointers, and flattening a pointer into
5868 a Message that goes across the network is a silly thing to do
5869 anyway.
5870 * Changed all instances of #include <winsock2.h> to
5871 #include <winsock.h>, since Muscle does not require any
5872 WinSock2-specific features.
5873 * The included fall-back regex library is now Henry Spencer's
5874 public domain implementation, instead of the GPL'd GNU version.
5875 * The Windows version of Thread::StartInternalThread() was broken.
5876 Thanks to VitViper for finding and fixing this bug!
5877
5878 v2.13 - Released 4/26/2002
5879 - Added Python support, with Message and MessageTransceiverThread
5880 classes, and pythonchat, a BeShare-compatible command-line
5881 demo chat app. Check out the README.TXT file in the python
5882 subfolder for details.
5883 - Added a readmessage.cpp utility to the test folder.
5884 - Added |= and &= operators to the Rect class.
5885 - StorageReflectSession methods NodeChanged(), NodeIndexChanged(),
5886 and NodeCreated() are now declared as virtual.
5887 * String::Trim() would crash with an assertion failure on some
5888 systems, due to incorrect handling of unsigned values. Thanks
5889 to Austin M. Brower (a.k.a. bobman) for catching this bug!
5890 * Tweaked the Makefiles and the SetupSystem.cpp file so that they
5891 compile properly under OS/X. (thanks again to Austin for this)
5892 * Fixed some problems that kept muscled from compiling under VC++.
5893 * Added a couple of checks to Message::Unflatten() to keep it from
5894 crashing if given a mangled flattened-Message to parse.
5895
5896 v2.12 - Released 4/4/2002
5897 - Added a SetAboutToFlattenCallback() method to the MessageIOGateway
5898 class. This allows you to install a hook that gets called when
5899 a Message is about to be flattened, in which you can modify or
5900 inspect the Message.
5901 - gcc now compiles muscled with the -fno-exceptions flag, resulting
5902 in somewhat more efficient code since muscle doesn't use exceptions
5903 anyway.
5904 - Added a muscleClamp() utility function to MuscleSupport.h.
5905 - Added << and >> operators to the Tuple declaration macros.
5906 - Removed the default/blank member items from the Tuple, Queue,
5907 and Hashtable classes, as I finally found a way to declare them
5908 properly on the stack instead. This should save some memory.
5909 * Snooze64() and GetCurrentTime64() were broken under Windows. Fixed.
5910 * Added a MUSCLE_MAX_OUTPUT_CHUNK #ifdef into ReflectServer.cpp, so
5911 that people with finicky routers can limit their send-chunk sizes
5912 by putting a -D flag into their Makefile if necessary.
5913 o Removed TCPSocketDataIO::PollSocketReadiness(), since it is never
5914 used, encourages polling, and causes warnings under C++Builder5.5.
5915
5916 v2.11 - Released 2/28/2002
5917 - Added RemoveDataNodes() and DoRemoveData() convenience methods
5918 to the StorageReflectSession API.
5919 - Changed the Thread class to have separate
5920 SetOkayToCloseInternalThreadWakeupSocket() and
5921 SetOkayToCloseOwnerWakeupSocket() methods, instead of passing
5922 in a "release" flag with the Get*WakeupSocket() calls. Also changed
5923 the Thread class to keep the socket values even when they are
5924 considered "released", so that signalling will still work if needed.
5925 * ThreadSupervisorSession::MessageReceivedFromOwner()'s argument list
5926 was missing a parameter, and thus it wasn't getting called. Fixed.
5927
5928 v2.10 - Released 2/7/2002
5929 - MUSCLE now supports compilation under Win32 using Borland's
5930 C++Builder 5.5 compiler. (use the Makefile in the 'borland' folder)
5931 - StringMatcher can now (as a special case) do simple integer range
5932 queries of the form "<15-252>", which would match strings.
5933 "15", "16", ..., "252". See StringMatcher::SetPattern() for details.
5934 - Added RemoveFirstInstanceOf() and RemoveLastInstanceOf() methods
5935 to the Queue class.
5936 - Added ByteBuffer and FlatCountable classes to the util folder.
5937 - Added AddFlat(FlatCountableRef), FindFlat(FlatCountableRef), and
5938 friends to the Message class. These allow you to add and retrieve
5939 FlatCountable objects to/from a Message by reference,
5940 so that they aren't actually flattened until the Message itself is.
5941 - Rewrote the Message class to use ByteBufferRefs instead of raw
5942 byte arrays for its flattened objects and raw data buffers.
5943 Note that this changes the semantics of these fields slightly--
5944 copying a Message object will no longer copy the contents of these
5945 fields, but rather the two Messages will now both reference the
5946 same data.
5947 - Pointer fields in Messages are no longer flattened, as the mechanics
5948 of doing so are non-portable (and silly).
5949 - All methods in the Message class now take String references instead
5950 of (const char *)'s for field names.
5951 - Removed all but one of the Message::GetInfo() methods, since they
5952 were redundant and/or inconsistent with the rest of the Message API.
5953 - Moved the "okayToAdd" parameter of the Replace*() methods in the
5954 Message class to the front of the argument list. (It was causing
5955 some nasty problems involving type promotion at its previous position)
5956 - class ObjectPool now derives from an interface class named
5957 AbstractObjectRecycler. Also, the Ref class now holds a pointer to
5958 an AbstractObjectRecycler, rather than to an ObjectPool. This allows
5959 more flexibility when keeping heterogeneous sets of objects referenced.
5960 - Added optional CopyTo() and CopyFrom() methods to the Flattenable class.
5961 These methods support copying one Flattenable object to another in the
5962 most efficient way possible. Per-class optimizations can be implemented
5963 by overriding the CopyToImplementation() and CopyFromImplementation()
5964 virtual methods as desired..
5965 * Default implementation of Flattenable::AllowsTypeCode() now accepts
5966 B_RAW_TYPE as well as TypeCode(), to allow unflattening from untyped data.
5967 * Removed the (char) constructor from the String class, as it was
5968 interfering with proper type checking of arguments.
5969 * Changed all index parameters in the Message class to use uint32
5970 instead of int32 (since negative indices don't make sense).
5971 * MessageTransceiverThread wasn't adding new sessions asynchronously
5972 (i.e. after StartInternalThread() had been called). Fixed.
5973 * MessageTransceiverThread would not deliver a
5974 MTT_EVENT_SESSION_DISCONNECTED message to the user code if an
5975 asynchronous connection to localhost failed. Fixed.
5976 * FinalizeAsyncConnect() was using the wrong test and thus sometimes
5977 thought an asynchronous connection had succeeded when it had in
5978 fact failed. Fixed.
5979 * ConnectAsync() was broken under Windows. Fixed.
5980
5981 v2.00 - Released 1/19/2002
5982 - All MUSCLE code is now declared as being in the 'muscle' namespace.
5983 This, plus all the changes listed below, pretty much guarantee that
5984 any source code that compilable with previous versions of MUSCLE won't
5985 compile now, and vice versa; sorry about that. Hopefully everything
5986 that needed changing has been changed by now though, so it shouldn't
5987 happen again (well, not soon anyway ;^)). If you need help updating
5988 your old MUSCLE-using code, let me know.
5989 - muscled now parses a 'maxmessagesize' argument, allowing you to limit the
5990 maximum size of incoming Message objects (so e.g. you don't have to worry
5991 about some joker sending you 100 megabyte Messages, tying up all your RAM)
5992 - muscled now parses 'maxsessions' and 'maxsessionsperhost' keywords to allow
5993 limiting of the number of simultaneous connections, or simultaneous
5994 connections from any given client IP address.
5995 - muscled now accepts a 'localhost' keyword which lets you specify what
5996 the advertised IP address of clients connecting from localhost should be,
5997 instead of (the rather useless) 127.0.0.1.
5998 - muscle now accepts the keywords "maxsendrate", "maxreceiverate", and
5999 "maxcombinedrate" -- these allow you to specify maximum allowed
6000 bandwidth usage (in KB/sec) for sending, receiving, or both.
6001 - muscled now accepts a 'require' keyword on the command line as well
6002 as 'ban', allowing for 'whitelisting' as well as 'blacklisting'.
6003 - admin now parses 'require' and 'unrequire' keywords on the command line.
6004 - Removed the word 'Portable' from all class names that had it; since
6005 muscle is now in its own namespace, a unique prefix is no longer necessary.
6006 - Completely rewrote the MessageTransceiverThread class. Now the
6007 MessageTransceiverThread class is portable code, with optional thin
6008 OS-specific wrapper subclasses available if you wish to use them.
6009 Moreover, MessageTransceiverThread now holds its own ReflectServer
6010 object, which means that it uses the same event loop as the servers
6011 do, and that a single MessageTransceiverThread object can manage multiple
6012 incoming and outgoing connections simultaneously.
6013 BMessageTransceiverThread, QMessageTransceiverThread, and
6014 AMessageTransceiverThread are the wrappers for BeOS, Qt, and AtheOS,
6015 respectively. (MessageTransceiverThread can also be used by itself
6016 if you prefer to stick with threads-and-TCP only)
6017 - Split the accept-tcp-sockets-thread functionality into its own
6018 class, AcceptSocketsThread. There is also a Qt-specific subclass of
6019 of this available, named QAcceptSocketsThread.
6020 - Added a Tuple templated class to the support folder. This class
6021 represents an array of numeric values, and is used to do simple
6022 vector math operations conveniently.
6023 - Point and Rect (nee PortablePoint and PortableRect) are now derived from
6024 Tuple, to avoid code duplication. The formerly public member variables
6025 x, y, left, top, right, and bottom values are now exposed as
6026 inline methods instead (e.g. use x() instead of x).
6027 - Added aggregate bandwidth metering/management capabilities to MUSCLE.
6028 This includes the introduction of a new interface, AbstractSessionIOPolicy,
6029 and a bandwidth-limiter subclass, RateLimitSessionIOPolicy.
6030 - Added a SetMaxIncomingMessageSize() method to the MessageIOGateway class.
6031 - Added a FilterSessionFactory decorator class, that can be used
6032 in conjunction with any other ReflectSessionFactory object to enforce
6033 ban-lists, require-lists, and/or connection limits.
6034 - ReflectSessionFactory and AbstractReflectSession now have a common base
6035 class, named ServerComponent, that provides them with limited access to
6036 their ReflectServer object.
6037 - Added SetLocalHostIPOverride() and GetLocalHostIPOverride() functions
6038 to NetworkUtilityFunctions.h, to set a custom IP address to use instead
6039 of 127.0.0.1 when necessary.
6040 - Added -= and - operators to the String class. (you saw it here first!)
6041 - Added a String constructor and assignment operator for char arg.
6042 - Renamed ObjectPool::GetObject() to ObtainObject() to avoid a naming
6043 conflict with a #define in the MS-Windoze headers. (evil!)
6044 - ObjectPool class is now thread-safe by default (unless you specify
6045 -DMUSCLE_SINGLE_THREAD_ONLY in your build line)
6046 - Added a new subfolder named "system", which contains code for exporting
6047 OS-specified functionality in a platform-independent manner. This folder
6048 currently holds a Mutex class and a Thread class, both of which
6049 wrap the relevant portions of several supported native APIs:
6050 BeOS, AtheOS, pthreads, Qt, and Win32. It also holds the
6051 new MessageTransceiverThread and AcceptSocketsThread classes, since
6052 these are special types of Thread, and the GlobalMemoryAllocator.
6053 - Moved the memory-usage-tracking code out of ReflectServer.cpp and into
6054 its own file, system/GlobalMemoryAllocator.{cpp,h}. Now you can choose
6055 whether or not to link this in to your server.
6056 - Added util/MemoryAllocator.{cpp,h}. These files contain a set of
6057 memory-allocation-handler classes, which can be composed together to
6058 create a custom memory allocation strategy. Included subclasses include
6059 BasicMemoryAllocator, ProxyMemoryAllocator, UsageLimitMemoryAllocator,
6060 and AutoCleanupMemoryAllocator.
6061 - Merged PortableTypeConstants.h, PortableTypeDefs.h, PortableByteOrder.h,
6062 PortableMacros.h, and PortableStatusConstants.h into a single file
6063 called MuscleSupport.h
6064 - Renamed the BeOS and AtheOS conversion routines to ConvertToBMessage(),
6065 ConvertFromBMessage(), ConvertToAMessage(), and ConvertFromAMessage().
6066 - Added a RawDataMessageIOGateway class to the iogateway folder. This
6067 class is handy for reading or writing chunks of unformatted bytes
6068 to/from a socket.
6069 - AbstractMessageIOGateway::DoInput() and DoOutput() now return the number
6070 of bytes that they read/wrote (respectively), or -1 if there was an error.
6071 (Before they returned a status_t). They now take a uint32 argument
6072 instead of a (uint32 &). The argument now indicates the maximum number
6073 of bytes they are allowed to read or write before returning.
6074 - Added an InsertOrderedData() method into StorageReflectSession so
6075 that subclasses can get more info about what gets inserted where.
6076 - Added new methods to the Message class: AddTag(), PrependTag(),
6077 FindTag(), and ReplaceTag(). These let you assign non-persistent,
6078 non-flattenable tag objects to a message that will be automatically
6079 dereferenced when the Message goes away.
6080 - ReflectSessionFactory classes are now in charge of deciding who
6081 gets to connect and who doesn't, rather than the StorageReflectSession
6082 class. This is useful because it means you can specify different
6083 access policies for different ports.
6084 - Removed AbstractReflectSession::GetClientPort() and replaced
6085 it with the (slightly more useful) GetPort() method, which returns
6086 the session's port number on the server side, instead.
6087 - Added AbstractReflectSession::SendMessageToFactory(), and
6088 ReflectSessionFactory::MessageReceivedFromSession(), so that
6089 sessions can send instructions to the factories that created them.
6090 - ReflectSessionFactory::CreateSession() now takes the IP string
6091 of the remote peer, to allow for filtering on IP addresses.
6092 - CreateAcceptingSocket() now takes optional arguments to return the
6093 selected port, and to specify an IP address to only accept from.
6094 - Added ConnectAsync(), FinalizeAsyncConnect(), GetHostByName(),
6095 CloseSocket(), Accept(), and Inet_AtoN() functions into the
6096 NetworkUtilityFunctions toolkit. Also added a version of Connect() that
6097 takes a numeric IP address rather than an ASCII string.
6098 - INet_NtoA() now returns a String instead of writing into a char buffer.
6099 - Added support for sessions that asynchronously connect outwards from
6100 the server: ReflectServer::AddNewConnectSession(),
6101 AbstractReflectSession::AddNewConnectSession(), and
6102 the callback AbstractReflectSession::AsyncConnectCompleted().
6103 - Added SaveNodeTreeToMessage() and RestoreNodeTreeFromMessage()
6104 methods to StorageReflectSession. These allow easy recursive
6105 archiving and restoration of database node subtrees and their indices.
6106 - Made a bunch of formerly protected members of StorageReflectSession
6107 private, and added protected accessors for some of them, where necessary.
6108 - Added sort-by-value capability to the Hashtable class, and rewrote the
6109 auto-sort interface so that there are separate SetKeyCompareFunction(),
6110 SetValueCompareFunction(), and SetCompareCookie() methods, as well as
6111 associated accessor methods.
6112 - Added Message::GetNumValuesInName().
6113 - GetMessageFromPool() now returns a MessageRef instead of a Message *,
6114 to avoid any possibility of a memory leak.
6115 - Added templated convenience functions muscleSwap(), muscleMin(), and
6116 muscleMax() to MuscleSupport.h.
6117 - Added a Shutdown() method to the AbstractMessageIOGateway interface,
6118 and made AbstractMessageIOGateway::GetDataIO() protected.
6119 - Added a GetSelectSocket() method to the DataIO interface. This method
6120 returns the socket fd to select() on for that DataIO (if any).
6121 - Removed AbstractMessageIOGateway::SetEnabled() and IsEnabled(), and
6122 replaced them with the single virtual method IsReadyForInput(), which
6123 function similarly to HasBytesForOutput().
6124 - Consolidated the server-side Pulse logic into a single base class,
6125 PulseNode. ReflectServers, AbstractMessageIOGateways,
6126 ReflectSessionFactories, and AbstractReflectSessions now all inherit from
6127 PulseNode, and thus are all capable of scheduling and receiving Pulse()
6128 calls for themselves.
6129 Also renamed ReschedulePulseTime() to InvalidatePulseTime().
6130 - AbstractDataIOGateway objects no longer take a DataIO pointer in their
6131 constructor arguments; instead, a separate SetDataIO(DataIORef) call
6132 is used to install the DataIO into the gateway.
6133 - Renamed the constant MUSCLE_NEVER_PULSE to MUSCLE_TIME_NEVER (since
6134 it is used in situations other than just Pulse() now).
6135 - Added the constant MUSCLE_NO_LIMIT, which is defined as ((uint32)-1).
6136 - Separated the DataIO creation from the CreateGateway() callback,
6137 making CreateGateway() implementations a bit simpler. Also added
6138 SetGateway() and GetGateway() methods so you can define a custom
6139 gateway for your session "in advance" if you want to.
6140 - Added SetRef(), SetFromGeneric(), and GetGeneric(), conveniences methods
6141 to the Ref class, as well as a Ref constructor that takes a GenericRef.
6142 - Renamed AddLogCallback() to PutLogCallback(), and change the arguments
6143 to take a LogCallbackRef instead of just a pointer.
6144 - Moved the log callback stuff into its own header file, syslog/LogCallback.h
6145 - Modified several APIs that were taking a pointer and an "ownIt" boolean
6146 to take Refs instead. That way the deletion can be handled automagically.
6147 - Removed the InitializeTCPStack() method from NetworkUtilityFunctions and
6148 added instead some SetupSystem classes, including a ThreadSetupSystem,
6149 a NetworkSetupSystem, and a CompleteSetupSystem. Placing one of these
6150 (usually a CompleteSetupSystem) on the stack at the beginning of main()
6151 is now the correct way to handle all environment setup and tear-down.
6152 - Added MiscUtilityFunctions.{cpp,h} files to the util subfolder. These
6153 contain utility functions that don't fit in anywhere else--currently
6154 they contain a ParseArgs() function that parses command line arguments
6155 into a Message object.
6156 - Added the SignalMessageIOGateway class -- a very simple gateway used
6157 primarily as a convenience class for thread synchronization.
6158 - Renamed MessageReceivedFromNeighbor() to MessageReceivedFromSession(),
6159 and renamed BroadcastMessageToNeighbors() to BroadcastMessageToSessions().
6160 - Added MessageReceivedFromFactory() and BroadcastMessageToFactory()
6161 methods to the ServerComponent class and its subclasses.
6162 - Added util/SocketHolder.h, to facilitate leak-proof socket file descriptor
6163 transfers via Message objects.
6164 - merged testreflectclient.cpp and testatheosclient.cpp into a single program,
6165 and got rid of testplaintextclient.cpp
6166 * Renamed Queue::CountItems() to GetNumItems(), and renamed Hashtable::Size()
6167 to GetNumItems(), for clarity and consistency.
6168 * Renamed all methods named MakeEmpty() to Clear(), for consistency.
6169 * functions in the SysLog API are now serialized in order to be thread-safe.
6170 * Removed the UnintrusiveRef class, as it isn't useful enough to keep around.
6171 * Fixed a bug in the PlainTextMessageIOGateway that would sometimes
6172 allow garbage characters into the imported text.
6173 * All TCP port number arguments are now specified as uint16s instead of ints.
6174 * All usages of size_t and ssize_t have been replaced with
6175 uint32 and int32, respectively (since that is more explicit/precise).
6176 * Removed the MUSCLE_CLASS_DECLARATIONS and MUSCLE_FUNCTION_DECLARATIONS
6177 tokens from the headers, since they didn't have a well-defined meaning.
6178 * Certain MUSCLE methods were using a non-standard convention of returning
6179 a boolean value to indicate success or failure. Modified all of the
6180 following methods to return a status_t (B_NO_ERROR or B_ERROR) instead:
6181 HashtableIterator::GetNextKey() HashtableIterator::PeekNextKey()
6182 HashtableIterator::GetNextValue() HashtableIterator::PeekNextValue()
6183 Hashtable::Get Hashtable::Put() Hashtable::Remove Hashtable::RemoveAux()
6184 Hashtable::GrowTable() Hashtable::MoveToFront() Hashtable::MoveToBack()
6185 Hashtable::MoveToBefore() Hashtable::MoveToBehind() Hashtable::Sort()
6186 Queue::AddTail() Queue::AddHead() Queue::RemoveTail() Queue::RemoveHead()
6187 Queue::RemoveItemAt() Queue::GetItemAt() Queue::ReplaceItemAt()
6188 Queue::InsertItemAt() Queue::EnsureSize()
6189 AbstractMessageIOGateway::EnsureBufferSize()
6190 Message::GetNextFieldName() Message::PeekNextFieldName()
6191 StorageReflectSession::DataNode::PutChild()
6192 StorageReflectSession::DataNode::InsertOrderedChild()
6193 StorageReflectSession::DataNode::ReorderChild()
6194 StorageReflectSession::DataNode::RemoveIndexEntry()
6195 StringMatcher::SetPattern() Flattenable::ReadData()
6196
6197 v1.93 - Released 12/05/2001
6198 - Added an optional second argument to PortableHashtable::GetIterator(),
6199 that lets you traverse the hashtable's contents backwards.
6200 - Added PortableHashtable::GetIteratorAt(), to allow iterations
6201 that start from any item in the table's traversal list.
6202 - Changed the compare function type for hash tables to return an int
6203 (strcmp() style) rather than a bool (== style), so that it can be used
6204 for sorting as well as comparison. Also added a (void *) cookie parameter
6205 so that the callback can access user-defined context information easily.
6206 - Changed PortableHashtable::SetCompareFunction() to take a second parameter
6207 specifying whether or not the compare function should be used to auto-sort
6208 entries as they are placed into the hash table.
6209 - Added Sort() and Sort(compareFunc) methods to PortableHashtable to allow
6210 in-place traversal order sorting.
6211 - Added the PR_COMMAND_REORDERDATA message type, to let clients reorder their
6212 indices without having to delete and reupload the associated data nodes.
6213
6214 v1.92 - Released 11/23/2001
6215 - PortableHashtables now retain the ordering of the items you Put() into them.
6216 (And since PortableMessage uses a PortableHashtable internally, this means
6217 also that PortableMessage now retains the ordering of the data fields you
6218 add to it)
6219 - Added MoveToFront(), MoveToBack(), MoveToBefore(), and MoveToBehind()
6220 methods to the PortableHashtable class. These methods allow the user
6221 to modify the iteration traversal order.
6222 - It is now possible to modify a PortableHashtable in the middle of
6223 traversing its contents with a PortableHashtableIterator, without causing
6224 an assertion failure or even messing up the traversal(!).
6225 - Renamed PortableHashtable::Contains() to ContainsValue(), to avoid
6226 confusion.
6227 - Rewrote PortableHashtableFieldNameIterator to be simpler and more efficient.
6228 - Rewrote ReflectServer to use only a PortableHashtable to hold
6229 AbstractReflectSessionRefs, instead of both a PortableHashtable and a
6230 PortableQueue.
6231 - Renamed ReflectServer::GetSessionsList() and
6232 AbstractReflectSession::GetSessionsList() to GetSessions(), which now
6233 returns a hashtable iterator instead of a reference to a PortableQueue.
6234 - Renamed ReflectServer::GetSessionByID() and
6235 AbstractReflectSession::GetSessionByID() to GetSession(), which now
6236 returns an AbstractReflectSessionRef instead of a status_t.
6237 - Added a +(char) operator to PortableString class.
6238 - Made the non-session-specific server API access methods in
6239 AbstractReflectSession protected, instead of public.
6240 - Added a SwapContents() method to the PortableHashtable class.
6241 * Fixed the GrowTable() method -- the user compare function wasn't
6242 being retained.
6243
6244 v1.91 - Released 11/01/2001
6245 - Added atomic inc/decs for Linux and Windows into PortableRefCount.h
6246 - The admin tool now waits for a response from the server, and informs you
6247 if your admin commands failed due to a privilege violation.
6248 - Changed GetPeerInfo() to try and find out what the local host's "real"
6249 IP address is if necessary, instead of returning 127.0.0.1.
6250 - moved the signal(SIGHUP, SIG_IGN) code into InitializeTCPStack().
6251 * Integrated Vitaliy's patches to get QMessageTransceiverThread to work
6252 under Windows.
6253
6254 v1.90 - Released 10/26/2001
6255 - Changed the PortableRefCount class to require that the items it
6256 reference-counts are subclasses of PortableRefCountable. This has the
6257 advantage of removing all the RefCountMem and RefCountMemPool dependencies;
6258 unfortunately it also breaks most of the MUSCLE-using code out there
6259 (slightly). The old PortableRefCount implementation is now called
6260 UnintrusivePortableRefCount, and is left in for use in cases where the
6261 reference-counted class cannot be modified to derive from
6262 PortableRefCountable.
6263 - Added a StorageReflectSession::CloneDataNodeSubtree() convenience method.
6264 - Added a CreateAcceptingSocket() function to NetworkUtilityFunctions. This
6265 function creates and returns a socket that is listening for incoming TCP
6266 connections on the given port.
6267 - Added a Flush() callback method to the LogCallback class, and a LogFlush()
6268 global function, so that SysLog output can be fflush()'d in a generic
6269 manner.
6270 - Added support for defining a custom threadsafe incrementor function in
6271 PortableRefCount.h
6272 - Added #define PR_NAME_SESSION "session" into StorageReflectConstants.
6273 Now when muscled sees a string with this field name in a client-to-client
6274 PortableMessage, it will replace the string value with the sending client's
6275 session ID. This allows receiving clients to be sure that the client who
6276 sent them the message is the client indicated in the server field of the
6277 message (i.e. it disallows "spoofing" of other clients).
6278 - Added an example flattened-PortableMessage byte listing to the end of
6279 PortableMessageIOGateway.h
6280 - Added AddHead() and AddTail() methods to PortableQueue that take
6281 other PortableQueues, rather than individual items.
6282 - QMessageTransceiverThread::PortableMessageReceived()'s second argument
6283 is now a uint32 instead of an int.
6284 - Added the InitializeTCPStack() function to NetworkUtilityFunctions.h
6285 (Starts up the TCP stack; only needed under Windows)
6286 - Added handy factory functions for the PortableMessageIOGateway and
6287 PlainTextMessageIOGateway classes.
6288 - Added the LogLineCallback convenience subclass to SysLog.{cpp,h}
6289 - Added Vitaliy's vc++ subfolder with VC++ project files.
6290 * More windows compatibility tweaks; muscled now compiles and runs under
6291 Windows XP with VC++! (many thanks to Vitaliy Mikitchenko aka VitViper!)
6292 * StorageReflectSession::NodePathMatcher::DoTraversal() was not giving
6293 correct results for traversals that used multiple query strings and
6294 didn't start from the global database root. Fixed.
6295
6296 v1.84 - Released 10/15/2001
6297 - Added a SpawnDaemonProcess() function to NetworkUtilityFunctions.h
6298 - Added a Snooze64() function to NetworkUtilityFunctions.h
6299 - Added ReleaseFile() and GetFile() methods to FileDataIO.h
6300 - Added a PR_NAME_SET_QUIETLY tag so you can upload nodes to
6301 the database without causing subscribers to be notified.
6302 - Added a PR_NAME_REMOVE_QUIETLY tag so you can remove nodes from
6303 the database without causing subscribers to be notified.
6304 - Added Jonathon Padfield's QSocketDataIO class to the qtsupport
6305 folder (for single-threaded Qt programs). Thanks, Jonathan!
6306 - Added a MCHECKPOINT macro to PortableMacros.h for use in debugging.
6307 - Added a RemoveAllInstancesOf(const ItemType &) method to the
6308 PortableQueue class.
6309 - Added == and != operators to the PortableQueue class.
6310 - testgateway.cpp now takes optional filename arguments. Any
6311 filenames given to it will be read as flattened PortableMessages
6312 and their contents printed to stdout.
6313 - Added a OnceEvery(uint64, uint64 &) function to TimeUtilityFunctions.h
6314 - PortableMessage::PrintToStream() now has optional arguments to make
6315 it function recursively with varying levels of indentation.
6316 - Added a new class regex/PathMatcher.{cpp,h} to the repertoire.
6317 This class can be used to do efficient pattern matching against
6318 node-path strings. Moved the functions in
6319 reflector/StorageReflectUtils.{cpp,h} into these files instead.
6320 - Previously subscribing to a string you were already subscribed to
6321 was a no-op. Now it is equivalent to a PR_COMMAND_GETDATA using
6322 that string.
6323 - PortableQueue::Sort() now takes an optional void pointer that will
6324 be passed through to the item-compare callback function.
6325 * Jonathon Padfield contributed a patch to PortableByteOrder.h to
6326 make it compile under FreeBSD. Thanks again J :^)
6327 * PortableRef class now has a proper copy-constructor.
6328 * Changed B_ERROR and B_NO_ERROR declarations from an enumeration
6329 to #defines, to avoid compiler warnings.
6330 * Fixed a bug in QMessageTransceiverThread that would cause
6331 TCP connections to be broken as soon as they were connected.
6332 * TCPSocketDataIO::Shutdown() now calls shutdown() before close().
6333 (Linux wasn't being properly punctual with just close())
6334 * PortableString::Unflatten() now checks to make sure the
6335 flattened string is terminated, and errors out if it isn't.
6336 * PortableHashtable::Put()'s default value for the last argument
6337 was false instead of NULL. Fixed.
6338 * Made several methods in StorageReflectSession inline and const tagged.
6339
6340 v1.83 - Released 9/12/2001
6341 - Added a qtsupport folder, containing QMessageTransceiverThread
6342 and QThreadSafeObjectPool classes for use with the Qt API.
6343 - Added more of David Rene's Visual C++ compatibility changes in.
6344 - Renamed GetCurrentTime() to GetCurrentTime64() to avoid a
6345 conflict with the like-named Windows function, and added
6346 David's Win32 implementation of the method.
6347 - Added MUSCLE_CLASS_DECLARATIONS and MUSCLE_FUNCTION_DECLARATIONS
6348 tokens into the header files where appropriate. These tokens
6349 are #defined to nothing by default, but can be overridden by the
6350 compile environment (-D flag) if necessary.
6351 - Added an "okayToAdd" argument to all the Replace*() methods
6352 in the PortableMessage class; if set to true, then attempting
6353 to replace a non-existing item will cause the new item
6354 to be added to the message instead of returning B_NO_ERROR.
6355 If set false, the old behaviour (fail if old item not present)
6356 is used instead.
6357 - Added a Reset() method to the MessageTransceiverThread classes.
6358 You can call Reset() on a MessageTransceiverThread object to
6359 re-initialize its state (comparable to deleting the
6360 MessageTransceiverThread object and creating a new one)
6361 - Added GetOutputStallLimit() methods to the AbstractMessageIOGateway,
6362 PortableDataIO, and TCPSocketDataIO classes. Now output stall
6363 detection is only done on TCP connections, and can be controlled
6364 per gateway or per data io type.
6365 - Changed the ReflectServer to take a ReflectSessionFactory object
6366 in PutAcceptPort() instead of a callback function. Converted all session
6367 creation callback functions into ReflectSessionFactory subclasses.
6368 - Added an overloaded () operator to the StringTokenizer class, as
6369 a convenience. It works as a synonym for GetNextToken().
6370
6371 v1.82 - Released 8/21/2001
6372 - During a memory shortage, muscled now kicks users whose output
6373 message queues have grown too large. This keeps someone with
6374 a bad network connection and an ambitious subscription request
6375 from tying up all the memory on the server indefinitely.
6376 - Changed the signature of AbstractMessageIOGateway::DoInput() and
6377 AbstractMessageIOGateway::DoOutput() to DoInput(uint32 & addReadBytes)
6378 and DoOutput(uint32 & addWroteBytes). DoInput() and DoOutput()
6379 should add to this argument the number of bytes they read or
6380 wrote during the call, respectively. This helps the calling
6381 code know when I/O is stalled.
6382 - muscled now keeps track of how long an output has been "stalled"
6383 (i.e. it has bytes queued to send to the client but none have
6384 actually been sent) and will drop any clients that have been
6385 stalled for more than 20 minutes.
6386
6387 v1.81 - Released 7/16/2001
6388 - Added Alan's stream operators ("<<") to the PortableString class.
6389 * Made AtheOS refcounts use atomic_add(), for thread safety.
6390 * Merged in David Rene's header tweaks to help MUSCLE code compile
6391 cleanly under Visual C++.
6392 * Tweaked time.h includes to compile properly under Debian Linux.
6393 * Messages being returned to the global message pool now have
6394 their 'what' code set to zero.
6395 * Fixed a potential source of problems during out-of-memory
6396 conditions in the PortableMessageIOGateway class.
6397
6398 v1.80 - Released 6/26/2001
6399 - Added an atheossupport directory, which is a AtheOS port of
6400 the BeOS code in the besupport directory.
6401 - Added testatheosclient.cpp and testatheossupport.cpp testing
6402 stubs to the test folder.
6403 * Consolidated the netutil, string, stringtokenizer, hashtable,
6404 refcount, pool, and queue subfolders into a single subfolder
6405 named 'util'. All code that uses MUSCLE will probably need
6406 to have its #include lines modified to reflect this, before
6407 it will compile again. :^( (this change was necessary in
6408 order to avoid #include space conflicts with the STL headers)
6409
6410 v1.72 - Released 6/22/2001
6411 - Added a "maxnodespersession" parameter to muscled, which lets
6412 you specify the maximum number of nodes any given session may
6413 have in its server-side database at one time.
6414 - Added a uint32 PR_NAME_MAX_NODES_PER_SESSION read-only parameter
6415 to the parameter set returned by PR_COMMAND_GET_PARAMETERS.
6416 This returns the value mentioned above.
6417 - Made some of the members of the DataNode class demand-allocated,
6418 so as to use a little less memory.
6419 - Tweaked the code to compile without errors under the CygWin environment.
6420 (thanks to Joshua Schmiedlin for his help with this)
6421 - Added a Sort() method to the PortableQueue class. This method
6422 uses a nice in-place merge-sort algorithm that I liberated from
6423 Thomas Baudel's sorting visualizer applet at
6424 http://www-ihm.lri.fr/~thomas/VisuTri/
6425 - Added Swap() and ReverseItemOrdering() methods to PortableQueue.
6426 These let you swap two entries or a invert the ordering of a
6427 whole range of entries, respectively.
6428 - ReflectServer now preallocates 256 slots for the lame-duck session
6429 list, so that adding a session to the lest is less likely to fail
6430 during a memory pinch.
6431 - Added a SetNotificationMessage() method to MessageTransceiverThread
6432 class (in case the regular old PORTABLE_MESSAGES_RECEIVED message
6433 isn't good enough for you)
6434
6435 v1.71 - Released 6/11/2001
6436 - Renamed ReflectServer::AddAcceptPort() to PutAcceptPort().
6437 Changed ReflectServer to allocate accept-sockets inside the
6438 PutAcceptPort() call instead of at the beginning of the
6439 ServerEventLoop(). Also added a RemoveAcceptPort() method to
6440 ReflectServer, and added PutAcceptPort() and RemoveAcceptPort()
6441 pass-through methods to AbstractReflectSession.
6442 - Added a BroadcastToAllNeighbors() convenience method to
6443 the AbstractReflectSession class.
6444 - Added a Seek() method to the PortableDataIO interface, and
6445 Seek() implementations to the various subclasses thereof.
6446 Moved FileDescriptorDataIO's implementation into a .cpp file
6447 so that it will link properly under Linux.
6448 * Added some missing constants to StorageReflectSession.java
6449
6450 v1.70 - Released 5/20/2001
6451 - Changed the Makefiles to reflect the changed, final location
6452 of the BONE headers (/boot/develop/headers/be/bone)
6453 - Changed the Put() methods of PortableHashtable to return
6454 true on success, false on error (memory allocation failure).
6455 NOTE: This changes the Put()'s return value semantics!
6456 If you code was relying on them, you will need to modify it.
6457 - Changed ReflectServer::ServerProcessLoop() to take no arguments,
6458 and added a method ReflectServer::AddAcceptPort(func, port) instead.
6459 This change allows a single server to accept connections on multiple
6460 ports if it wants to, and create different AbstractReflectSession objects
6461 based on the port the TCP connection was received on. As a consequence
6462 of this, you can now have muscled listen on multiple ports if you like;
6463 e.g. muscled port=2960 port=4000 port=9999
6464 - Added a GetServerUptime() method to the ReflectServer and
6465 AbstractReflectSession classes, and a PR_NAME_SERVER_UPTIME
6466 field to the message returned by PR_COMMAND_GET_PARAMETERS.
6467 The value returned is muscled's uptime, in microseconds.
6468 * Changed the AddLogCallback() and AddOutOfMemoryHandler() functions
6469 to return B_ERROR on out-of-memory.
6470 * Changed the muscled code to handle Put() failing a little better.
6471 This should fix some of the memory leaks that occur when the server
6472 has hit its memory cap.
6473
6474 v1.64 - Released 5/07/2001
6475 - Added dataio/MemoryBufferDataIO.h. This class lets you use
6476 an in-memory array as a limited input or output device.
6477 - Added a new first parameter to BecomeDaemonProcess(). This
6478 first param lets you specify the directory that the child
6479 process should chdir() to. Leave as NULL to not change directory at all.
6480 - Added a GetReadByteTimeStamp() method to the PortableDataIO
6481 interface. (used to support high-precision time-stamping in LCS-specific
6482 subclasses. Not implemented by any of the included MUSCLE classes, though)
6483 - Added a PR_COMMAND_BATCH message type. When the server receives
6484 this message, it will parse the submessages in the PR_NAME_KEYS
6485 field and execute them in order as if they had arrived separately.
6486 - Added a PR_COMMAND_NOOP message types. When the server receives
6487 this message it is guaranteed to do nothing at all with it.
6488 - In the StorageReflectSession class, changed NotifySubscribersOfNewNode(),
6489 NotifySubscribersThatNodeChanged(), and
6490 NotifySubscribersThatNodeIndexChanged() to be virtual so that they can be
6491 overridden and used as hooks in a subclass.
6492 - Added a CreateConnectedSocketPair() function to the
6493 NetworkUtilityFunctions.h package. This function is useful
6494 for thread coordination.
6495 - Added a SetSocketBlockingEnabled() function to NetworkUtilityFunctions.h
6496 - muscled now compiles and runs under AtheOS, thanks to a
6497 patch submitted by Jonas Sundstrom.
6498 * The docs were referring to the muscled's pattern matching
6499 feature as 'regular expressions'. This was inaccurate, as
6500 muscled doesn't parse regular expressions so much as wildcard
6501 expressions, a.k.a. globbing. Changed the docs to reflect this.
6502 * PortableString::LastIndexOf(char) was broken. Fixed.
6503 * Boolean PortableMessage fields were broken on architectures
6504 where sizeof(bool) was not equal to one. Fixed.
6505
6506 v1.63 - Released 3/25/2001
6507 - iogateway/PlainTextMessageIOGateway.cpp now works. While not
6508 used by muscled, this class can be used by other programs for
6509 easy communication with servers that speak ASCII text (e.g.
6510 web servers, XML server, e-commerce servers, etc). See
6511 PlainTextMessageIOGateway.h for details.
6512 - Added test/plaintextclient.cpp and test/portableplaintext.cpp.
6513 These are command line communications test programs, similar
6514 to testreflectlient.cpp and portablereflectclient.cpp, respectively,
6515 but using plain text streams rather than flattened PortableMessages.
6516 - Added a Shutdown() method to the PortableDataIO classes. This
6517 method can be used to immediately close the underlying socket/file
6518 descriptor/whatever, without having to delete the PortableDataIO object.
6519 - Made AbstractMessageIOGateway::GetDataIO() public.
6520 - BecomeDaemonProcess() now takes two optional arguments: the
6521 first indicates where to redirect stderr and stdout to. Default
6522 value is "/dev/null". The second indicates whether or not to
6523 try and create a file if it can't be opened; default is false.
6524 * When the MessageTransceiverThread gets an I/O error, it now closes
6525 its connection immediately (by calling GetDataIO()->Shutdown())
6526 rather than waiting for the user to do it.
6527 * The muscled ServerProcessLoop() and MessageTransceiverThread now
6528 both suppress SIGPIPE signals, as these can be raised when sending
6529 to a remotely-closed socket, killing the thread.
6530
6531 v1.62 - Released 3/2/2001
6532 - Added a PR_NAME_SERVER_VERSION parameter to the parameter set
6533 returned by the server. This field contains a string to indicate
6534 the version of MUSCLE the muscled server was compiled from.
6535 (Currently the string is "1.62")
6536 * Several parameter name constants were missing from
6537 StorageReflectConstants.java. Added.
6538 * The clever byte-swapping macros put in for MacOS/X were screwing
6539 up the byte-ordering for Linux, so I removed them.
6540 * PortableMessage.java had a call to Vector.add() in it. Changed it to
6541 Vector.addElement().
6542 * Made the _empty Hashtable in PortableMessage.java demand allocated,
6543 otherwise IE would barf on it.
6544
6545 v1.61 - Released 2/16/2001
6546 - Changed the Pulse()/GetPulseTime() callbacks to use uint64s instead of
6547 timeval structs--uint64's are much easier to use than timevals.
6548 - Added a BecomeDaemonProcess() function to NetworkUtilityFunctions.h
6549 This function calls fork() and all the other incantations necessary to
6550 convert the current process into a canonical Posix daemon task.
6551 - muscled now recognizes the parameter 'daemon'. If specified, muscled
6552 will detach from the shell and run as a background/daemon task.
6553 * muscled now parses keywords even if they have no '=' sign/value specified.
6554 * Changed the SysLog implementation to use separate callbacks for console
6555 and file logging. Before it was using the same callback for both, but
6556 certain versions of Linux crash if I try to re-use a va_list object.
6557
6558 v1.60 - Released 2/1/2001
6559 - Added Java client support to MUSCLE! (See README-JAVA.txt)
6560 - Changed header comments to JavaDoc style throughout.
6561 - Added extra commenting to a lot of previously uncommented header code.
6562 Now all public and protected methods and member items are documented.
6563 - The muscle/html/autodoc/genDocs.sh script now calls doxygen instead
6564 of PERCEPS. Doxygen is a very nice autodocumenting program, and a
6565 BeOS port can be found on BeBits.
6566 - Added a muscle.dox config file to the muscle/html/autodoc directory.
6567 - Added a () operator to the PortableString class so you can say
6568 myString(), instead of myString.Cstr(), if you want.
6569 - PortableString methods StartsWith, EndsWith(), EndsWithIgnoreCase(),
6570 and StartsWithIgnoreCase() now return bool instead of int.
6571 - The PR_RESULT_PARAMETERS messages returned by the server now include
6572 uint64 PR_NAME_SERVER_MEM_AVAILABLE, PR_NAME_SERVER_MEM_USED, and
6573 PR_NAME_SERVER_MEM_MAX fields that indicates how much
6574 memory the server has available to be allocated by all MUSCLE clients.
6575 - Added a FileDescriptorDataIO class to the dataio directory. This
6576 dataio supports sessions that want to do read() and write() on a
6577 file descriptor for their I/O.
6578 * AddFlat(), PrependFlat(), ReplaceFlat(), and FindFlat() will
6579 now call their Point, String, or Message counterparts if they
6580 are passed a PortablePoint, PortableString, or PortableMessage object.
6581 * Flattened objects added to a PortableMessage are now filed using
6582 the field type returned by their TypeCode() member, rather than
6583 always as B_OBJECT_TYPE. This will break compatibility with old
6584 clients that expected B_OBJECT_TYPE flattened objects; sorry about that.
6585 * Added in some extra tweaks so that MUSCLE will compile under MacOS/X.
6586 * A bunch of member variables of the AbstractMessageIOGateway class
6587 were protected when they should have been private. Changed them
6588 to private and added protected accessor methods where necessary.
6589 * HTML-ized the README.TXT file (now named README.html)
6590
6591 v1.51 - Released 1/3/2001
6592 - Added PR_COMMAND_KICK, PR_COMMAND_ADDBANS, and PR_COMMAND_REMOVEBANS
6593 commands. Messages of these types instruct the muscle server to
6594 disconnect other clients, forbid IP addresses from connecting to
6595 the server, and remove previously added bans, respectively.
6596 These messages will only be honored if sent by a privileged
6597 client; otherwise a PR_RESULT_ERRORACCESSDENIED message is returned.
6598 - muscled now takes "privban=<pattern>", "privunban=<pattern>",
6599 "privkick=<pattern>", and "privall=<pattern>" arguments, to
6600 specify which clients are allowed to do kick, ban, or unban ops.
6601 (if not specified, no clients will be privileged)
6602 - Added an 'admin' command-line tool to the muscle/server
6603 directory that lets you manage your server's ban lists
6604 and/or kick users without having to restart the server.
6605 Run 'admin help' for args.
6606 - Made ReflectServer::GetCentralState() public.
6607 * Removed the ClientConnected() and SetClientConnected()
6608 callbacks in favor of a more elegant StorageReflectSession
6609 oriented privileges system. The new system allows the server
6610 operator to specify which clients are allowed to kick, ban,
6611 and unban other clients.
6612
6613 v1.50 - Released 12/29/2000
6614 - Loosened up the flattened-PortableMessage protocol specification
6615 a little bit. It is now legal to add fields with arbitrary typecodes
6616 to a PortableMessage, and PortableMessages with fields that have
6617 arbitrary typecodes may be Unflatten()'d without causing an error.
6618 This will allow the addition and use of new datatypes without breaking
6619 backwards compatibility, thus avoiding a repeat of the problems that
6620 were caused by adding the B_MIME_TYPE support.
6621 - support/PortableMacros.h now contains a MUSCLE_VERSION_STRING
6622 #define, indicating the current version of MUSCLE. muscled
6623 will print this version string out on startup if you set
6624 the display threshold to DEBUG or lower.
6625 * Tweaked StorageReflectSession.{cpp,h} to get it to compile under
6626 Red Hat Linux 7.0.
6627
6628 v1.45 - Released 12/22/2000
6629 - Added a GetPeerInfo() function into NetworkUtilityFunctions.{cpp,h}.
6630 This function returns the remote host IP and port of a connected socket.
6631 - Added a ClientConnected() virtual method and
6632 SetClientConnectedCallbackFunc() method to ReflectServer. Both of these
6633 mechanisms allow connecting clients to be checked before allowing them
6634 access to the server.
6635 - muscled can now accept zero or more ban=<ipaddr> arguments on the command
6636 line. Each ban argument specifies an IP address (or wildcard pattern of
6637 IP addresses) to ban from the server.
6638 - Added EndServer() methods to the ReflectServer and AbstractReflectSession
6639 classes. These allow you to cause muscled to exit in a controlled manner.
6640 - You can now disable the memory-usage-tracking overloads of new and
6641 delete by defining the preprocessor symbol DISABLE_MUSCLE_MEMORY_TRACKING
6642 for ReflectServer.cpp.
6643 - muscled's Makefile now supports both optimized and unoptimized builds
6644 of muscled. Do "make" for an unoptimized build, or "make optimized"
6645 for an optimized build. (Be sure to "make clean" first when switching
6646 from one to the other!)
6647 * Fixed a couple of memory leaks in the PortableHashtable class.
6648 * Rewrote PortableHashtable::GrowTable() to handle out-of-memory
6649 conditions correctly.
6650 * Removed the WATCH_MUSCLE_MEMORY_USAGE macros, since the overloaded
6651 new and delete operators do the same thing in a more elegant way.
6652 * Updated the docs slightly to reflect the fact that level one
6653 server-database nodes are named after the clients' IP addresses,
6654 not their hostnames.
6655 * Fixed an uninitialized-pointer problem that could make muscled
6656 crash while denying a login.
6657
6658 v1.44 - Released 12/21/2000
6659 - Modified PortableHashtable to maintain a linked list of
6660 PortableHashtableEntry objects. This should speed up traversals
6661 somewhat, as the PortableHashtableIterator no longer needs to
6662 iterate over the empty portions of the table.
6663 - Merged in Trey Boudreau's changes to support adding fields of
6664 type B_MIME_TYPE to a PortableMessage.
6665 - Added IndexOfIgnoreCase() and LastIndexOfIgnoreCase() methods
6666 to PortableString that take chars instead of (const char *)'s
6667 as their second argument.
6668
6669 v1.43 - Released 12/01/2000
6670 - Added a "Custom Servers.html" file to muscle/html. This file contains
6671 information on making your own custom MUSCLE server.
6672 - Changed ObjectPool to reuse items in LIFO order rather than FIFO.
6673 This may increase cache coherency in some cases.
6674 - Makefile now compiles muscled with -O3 and -fomit-frame-pointer options
6675 under gcc, for efficiency.
6676 - Added SetMessageFlattenCallback() and SetMessageUnflattenCallback()
6677 methods to the PortableMessageIOGateway class (for when you can't be
6678 bothered to do proper subclassing ;^))
6679 - Added ParseLogLevelToken() function to SysLog.h, and added 'display'
6680 and 'log' arguments to muscled, so that you can specify how what sort
6681 of output you want on the command line.
6682 (e.g. "./muscled display=debug log=none")
6683 - Added more *IgnoreCase() methods to PortableString, and changed
6684 PortableString::Equals() to return a bool instead of an int.
6685 - Pulled the timeval utility functions out of NetworkUtilityFunctions.{cpp,h}
6686 and into their own file, netutil/TimeUtilityFunctions.h
6687 Also declared them all inline, so you don't need to link anything
6688 extra in to use them.
6689 - Moved references to <sys/time.h> into PortableTypeDefs.h, and added
6690 a #include there so that including this header can be avoided.
6691 (This is to support certain embedded architectures which don't
6692 seem have this file...)
6693 - Added a operator() overload to the PortableRefCount(), so you can
6694 now specify myRef() instead of myRef.GetItemPointer().
6695 * Renamed the LOG_* constants in SysLog.h to MUSCLE_LOG_*, to avoid
6696 conflicts with the constants in Be's support/syslog.h header. (This
6697 may break some existing code, sorry about that)
6698 * Disabled the memory-allocation code under BeOS/PowerPC environments,
6699 as it was causing mysterious crashes (possible compiler bug?). This
6700 means that if you are running muscled on a PowerPC BeOS machine, the
6701 memory allocation limits will be ignored.
6702
6703 v1.42 - Released 10/18/2000
6704 - Added a new function, AddOutOfMemoryHandler((void *)()). This lets you
6705 install your own handler that will be called in the event of a memory
6706 allocation failure.
6707 - Added a new command code, PR_COMMAND_PING. When muscled receives a message
6708 of this type from its client, changes the message's 'what' code to
6709 PR_RESULT_PONG, and sends the message right back to the client.
6710 - Added a GetRemainderOfString() method to the StringTokenizer class.
6711 * Moved the StorageReflectSession::DrainPools() call out of ReflectServer.cpp,
6712 and into a callback that is installed by muscled.cpp. This allows custom
6713 servers to be compiled without having to link in StorageReflectSession.o.
6714 * The memory-tracking new and delete operators now count their own
6715 4-byte-per-allocation overhead in the allocated-memory total.
6716
6717 v1.41 - Released 10/8/2000
6718 - Added a FindDataPointer() method to the PortableMessage class.
6719 This method returns a writable pointer to a field's data
6720 array, for efficiency.
6721 - PortableMessage::AddData() now allows the (data) parameter to
6722 be NULL. If (data) is NULL, default-constructed objects or
6723 uninitialized data bytes will be added to the PortableMessage.
6724 - PortableMessage::FindData() and FindDataPointer() now allow
6725 the (numBytes) parameter to be NULL.
6726 - muscled now parses command line arguments of the form
6727 keyword=value. Currently supported keywords are 'port',
6728 'help', and 'maxmem'.
6729 - muscled now detects out-of-memory situations and tries to free up
6730 some memory by draining the object pools and/or forcibly
6731 disconnecting the active session when an out-of-memory error occurs.
6732 - muscled now lets you specify the maximum number of bytes of
6733 data it should allow itself to have allocated at any one time.
6734 For example, entering "muscled maxmem=15" will cause muscled
6735 to not help itself to more than 15 megabytes of memory.
6736 * Went through the code and made it more resistant to crashing
6737 in out-of-memory situations. (i.e. it should correctly handle
6738 NULL being returned by new (nothrow) in all cases)
6739 * Fixed a bug that would cause muscled to crash if it was
6740 sent a malformed PortableMessage. Thanks to Ben and Pete
6741 for helping me find this bug!
6742 * Now compiles cleanly with full warnings enabled, thanks
6743 to Christopher Tate.
6744
6745 v1.40 - Released 9/8/2000
6746 - Added ordered-child-indexing to StorageReflectSession. Support
6747 for this includes the new PR_COMMAND_INSERTORDEREDDATA code,
6748 the PR_RESULT_INDEXUPDATED result code, and the INDEX_OP_*
6749 enums. (see comments in StorageReflectConstants.h and the new
6750 chapter at the end of the Beginner's Guide for details)
6751 - Added Prepend*() methods to the PortableMessage class.
6752 - PortableQueue and PortableString can now handle very small
6753 strings/lists without having to do any dynamic memory allocation.
6754 - Added Head(), Tail(), HeadPointer(), TailPointer(), and
6755 InsertItemAt() to PortableQueue.
6756
6757 v1.31 - Released 7/30/2000
6758 - Added custom-callback capability to the SysLog module.
6759 (AddLogCallback(), RemoveLogCallback())
6760 - Added the OnceEvery() function to NetworkUtilityFunctions.
6761 * Fixed an uninitialized timeval struct in AbstractMessageIOGateway--
6762 this was causing muscled to panic and exit sometimes under FreeBSD.
6763 (Thanks to Peter Schultz for helping track down this bug!)
6764
6765 v1.30 - Released 6/30/2000
6766 - Added optional object-allocation tracking into the code.
6767 This tracking is useful for hunting down memory leaks; to enable it
6768 uncomment the -DMUSCLE_WATCH_MEM_USAGE line in the Makefile and
6769 recompile the server (from scratch). With this flag enabled,
6770 the server will print out memory-allocation stats every so many
6771 seconds.
6772 - Added some PR_COMMAND_RESERVED and PR_RESULT_RESERVED constants
6773 to StorageReflectConstants.h to allow future expansion.
6774 - Added a PR_RESULT_ERRORUNIMPLEMENTED code. This message is
6775 sent back to the client when the client sends a PR_COMMAND_RESERVED
6776 code that the serverd doesn't understand.
6777 - Added a PR_COMMAND_JETTISONRESULTS command. When the server receives
6778 a message of this type, it will match the paths given in PR_NAME_KEYS
6779 against the items in its list of outgoing PR_RESULTS_DATAITEMS messages,
6780 and any matched items will be deleted and not sent. If no PR_NAME_KEYS
6781 field is found in the PR_COMMAND_JETTISONRESULTS message, then all
6782 pending PR_RESULTS_DATAITEMS messages will be dumped. (This is useful
6783 when a client is receiving a large result set and decides in the middle
6784 of the download that he's no longer interested in it)
6785 - muscled no longer does a hostname lookup when a client logs in.
6786 This speeds up muscled's response time (and frees it from depending
6787 on a working nameserver) but it means that nodes in level one
6788 of the database tree will look like '127.0.0.1' instead of
6789 'mycomputer.mydomain.com'.
6790 - Added ClientConnectionClosed() callback to the AbstractReflectSession
6791 class, so that a session can decide whether it wants to stick around
6792 after its TCP connection is gone.
6793 - Replaced the AbstractReflectSession class's GetIncomingMessageQueue()
6794 and GetOutgoingMessageQueue() methods with the more flexible
6795 GetGateway() and SetGateway() methods.
6796 - Added some utility functions to StringMatcher.{cpp,h}:
6797 IsRegexToken(), HasRegexTokens(), and MakeRegexCaseInsensitive().
6798 - Now compiles under FreeBSD4.0, using gmake.
6799 * The StringMatcher wasn't handling parentheses properly. Fixed it,
6800 so now you can use expressions like *.(jpg,mp?). Also rewrote the
6801 regex translation code to be more readable, and fixed a nasty
6802 dangling-pointer bug in the process.
6803 * Changed the RefCountMem class to use atomic_add instead of the
6804 C preincrement and predecrement operators, so that it can be used
6805 safely in multithreaded environments.
6806 * Fixed a subtle bug in the Remove*() methods of the PortableQueue
6807 class that could cause crashes if you were removing items whose
6808 assignment operators looked at the PortableQueue they were
6809 being removed from... geez
6810 * Added some missing virtual destructors
6811 * Rewrote the PortableString class to be more efficient, and
6812 in the process found and fixed a nasty bug--the CStringHashFunc()
6813 was completely broken.
6814 * StringMatcher::Match() is now tagged as const.
6815
6816 v1.24 - 6/17/2000
6817 - muscled now splits its PR_RESULT_DATAITEMS messages into multiple
6818 messages if the message has more than 50 items in it. This allows
6819 for more fine-grained updates.
6820 - Added a PR_NAME_MAX_UPDATE_MESSAGE_ITEMS parameter that can
6821 be set by the client to change the above threshold if desired.
6822
6823 v1.23 - 6/15/2000
6824 - Added a StartServerThread() method to the MessageTransceiverThread
6825 class. Now the MessageTransceiverThread can be used to accept
6826 multiple overlapping connections, instead of just a series of
6827 single connections.
6828 * make clean now removes .xSYM files.
6829
6830 v1.22 - 6/14/2000
6831 * MessageTransceiverThread::WaitForAllMessagesToBeSent() was broken.
6832 Changed it to use benaphores instead of BLockers, and now all is well.
6833
6834 v1.21 - 6/12/2000
6835 - Added Prepend() and Append() methods to PortableString.
6836 - Added InetNtoA() convenience method to NetworkUtilityFunctions.cpp
6837 - Added EscapeRegexTokens() to StorageReflectUtils.h
6838 * User messages would be reflected back to the sender even when
6839 the reflect-to-self flag wasn't set. Fixed.
6840 * Fixed several bugs in the MessageTransceiverThread class.
6841 * muscled now handles connections from localhost correctly.
6842
6843 v1.20 - 6/8/2000
6844 - Added new accessors to PortableHashtable and PortableMessage that
6845 return key and value objects by pointer rather than by value.
6846 This can make access and traversals more efficient, as it eliminates
6847 an unnecessary data copy.
6848 - Added default constructors to the PortableHashtableIterator and
6849 PortableMessageFieldNameIterator classes so that you can use
6850 them in arrays, as class members, etc.
6851 - Added SetOutgoingQueueDrainedMessage() to the MessageTransceiverThread
6852 API so that you can (optionally) receive notification when the outgoing
6853 message queue has become empty.
6854 * Made ObjectPool's destructor virtual.
6855
6856 v1.10 - 6/1/2000
6857 - Added ReplaceSession() method, by which a server-side session object
6858 can replace itself with a different one.
6859 - AbstractMessageIOGateway objects can now request Pulse() callbacks.
6860 - Added system logging, to the console or to a log file, or both.
6861 * Fixed some minor compilation problems
6862
6863 v1.01 - 4/11/2000
6864 o Redesigned the Pulse() support to work based on absolute wakeup times
6865 rather than relative periods.
6866 - Added some convenience methods for working with timeval structs to
6867 NetworkUtilityFunctions.h
6868
6869 v1.00 - 3/29/2000
6870 - Initial release