The C++ framework for developing highly scalable, high performance servers on Windows platforms.

Release Notes - IO Tools Library


You might also be interested in the release notes for the libraries that this one is built on:


Version 7.4
  • Remove support for Visual Studio 2015.
  • Remove deprecated functionality.

Version 7.3
Version 7.2
  • Removal of manual "#define include guards" now that all supported compilers support pragma once.
  • Removal of out of date lint directives.
  • Added support for Visual Studio 2022 Preview.

Version 7.1
Version 7.0
  • Major changes due to preparations for multi-platform support. Addition of CoreTools library which contains all cross platform code that was previously in Win32Tools.

Version 6.9.5
  • Added support for Visual Studio 2019 (16.5 - 16.9).
  • Updated project files to make release build optimisations consistent.
  • Rationalised precompiled header usage.
  • Removed unrequired includes.
  • Began to move towards removing JetByteTools\Win32Tools\Utils.h by splitting it into more functionally cohesive headers.
  • Changes to avoid explicitly catching JetByteTools::Win32::CSEHException now that it derives from JetByteTools::Win32::CException.
  • Added a move constructor to JetByteTools::IO::CBufferChainStoresNulls
  • Added JetByteTools::IO::CFixedFileHeaderRotatingAsyncFileLog which is a rotating log that can have some lines designated as 'header lines' that are included at the start of every new log file that is created.
  • Changes to everything that supports JetByteTools::Win32::ILogMessages to support the new methods for writing blocks of lines at once.
  • Changes to JetByteTools::IO::CRotatingAsyncFileLog to support file rotation based on number of lines or number of bytes and to allow turning off the logging of thread id and/or timestamp.

Version 6.9.4
  • Added support for Visual Studio 2019 (16.4).
  • Added a debug log message to alert you to the fact that a JetByteTools::IO::CAsyncFileLog instance has had OnPendingWriteLimit() called. This can seriously affect performance and is likely something that you want to be informed of!

Version 6.9.3
  • Fixed issued raised by Resharper++
  • Changed include path separators from \ to / so as to support compilation on Linux using CLANG
  • Fixed case of include file names to aid portability.
  • Migrating code towards 'modern C++' idioms.
  • Suppress warning C4355 "'this': used in base member initializer list" in Warnings.h and remove per file suppressions. We just use this idiom far too often for it to be a special case.
  • Added support for Visual Studio 2019 (16.3).
  • Dropped support for Visual Studio 2013.
  • Removed code that was deprecated by JETBYTE_DEPRECATE_BUFFER_CHAIN_METHODS and JETBYTE_DEPRECATE_BUFFER_PROCESSOR_METHODS.

Version 6.9.2
Version 6.9.1
  • Added support for Visual Studio 2017 15.5.
  • Added JetByteTools::IO::CBuffer::ReportOwnershipChange() so that reference tracking of buffers will report richer traces from smart pointers.
  • Added code to prevent new items being posted to objects derived from JetByteTools::IO::CIOPoolBase after the pool has been shut down.

Version 6.9
Version 6.8
Version 6.7
Version 6.6.5
Version 6.6.4
  • Bug fix to JetByteTools::Win32::CBuffer and JetByteTools::Win32::CLockFreeBuffer to make code take notice of when m_maxBytesToRead is set. This was causing issues with WebSockets over SSL where the WebSocket code was setting a max read value and the SSL connector was ignoring it and providing more data than it should.
  • Adjusted all includes to remove relative paths and instead be absolute in relation to the library root. So, rather than include "..\Blah.h" it would always be include "JetByteTools\Lib\Blah.h" this is due to a new warning in Visual Studio 2015 update 1.

Version 6.6.3
Version 6.6.2
  • Changes to remove non-trivial, function level static objects from the code, the construction of which is problematic in multi-threaded code.
  • Added JetByteTools::IO::IBufferBase::GetSpace() which returns the available space in a buffer, size - used.
  • Added JetByteTools::IO::IBuffer::GetTotalSpace() which returns all available space in a buffer, this is GetSpace() plus any space that is currently unused at the front of the buffer due to calls to Consume().
  • Added JetByteTools::IO::IBuffer::RemoveSpaceAtFront() which compacts a buffer by removing any unused space at the front and copying any data back towards the front of the buffer.
  • Removed the slight 'optimisation' in JetByteTools::IO::CBuffer::Consume() which led it to behave as JetByteTools::IO::CBuffer::ConsumeAndRemove() if there would be less than 100 bytes remaining in the buffer after the call.
  • Changed JetByteTools::IO::IBuffer::MakeSpaceAtFront() so that it takes an optional value which indicates how much space must be available at the rear of the buffer. This allows us to be able to create space at the front only if there's enough space in the buffer for the space we need at the front and rear of the buffer.
  • Bug fix to JetByteTools::IO::CBufferChain::AddDataToBufferChain() to allow for passing in an empty list of buffers to add.
  • Bug fix to JetByteTools::IO::CBufferChain::ConsoliateData() to ensure that buffers that we attempt to consolidate are writeable.
  • Changed JetByteTools::IO::CBufferChainStoresNulls so that you can pass it an instance of JetByteTools::IO::IAllocateBuffer in its constructor and it can then use that to allocate a new empty buffer if the number of 'null buffers' stored becomes too great. This effectively removes the limit on the number of 'null buffers' that can be stored between non-null buffers.
  • JetByteTools::IO::IBuffer now derives from JetByteTools::Win32::CIntrusiveRedBlackTreeNode which allows for buffers to be placed in non-intrusive containers.
  • Added JetByteTools::IO::CSequencedBufferCollection which is a collection based on JetByteTools::Win32::TIntrusiveRedBlackTree which stores the buffers in sequence number order.
  • Changed JetByteTools::IO::CSortedBufferChain so that it caches whether you can get the next buffer or not. This reduces the work that needs to be done to find out if you can get the next buffer.

Version 6.6.1
  • Bug fix to the allocation and creation of JetByteTools::IO::CNonPooledBuffer which was failing to force the correct alignment. See the JETBYTE_IO_IBUFFER_ALIGNMENT_REQUIREMENT changes in version 6.6 for more details
  • Added JetByteTools::IO::CTimeChangeAwareRotatingAsyncFileLog, which is a rotating async file log which includes a JeyByteTools::IO::CTimeChangeNotificationMonitor.

Version 6.6
  • Much of the locking in this library has been updated to use the new locks, see Win32Tools for details.
  • Removed some cout debug tracing from JetByteTools::IO::CAsyncFileLog.
  • Added an alignment restriction to buffers derived from JetByteTools::IO::IBuffer. All such buffers must be aligned on a JETBYTE_IO_IBUFFER_ALIGNMENT_REQUIREMENT byte boundary (currently 16). This is to facilitate using some "spare" bits in the resulting pointers for other purposes. At present only JetByteTools::IO::CBufferChainStoresNulls uses this functionality.
  • Added JETBYTE_CRASH_DUMP_ON_NEXT_BUFFER_REF_CHANGE_AFTER_ILLEGAL_CHANGE which causes crash dumps to be created the next time AddRef() or Release() is called on a buffer after an illegal ref count change (over-release or under-release) has been detected.
  • Added JetByteTools::IO::IPoolBuffers and JetByteTools::IO::IAddBuffersToPool and JetByteTools::IO::CCustomPoolSmartBuffer which are used to create and manage "custom buffer pools". Buffers can now be released or allocated from these custom buffer pools with the pool acting as a local pool which can release buffers directly to an allocator if it is full and obtain buffers from an allocator if it is empty. These custom pools are used to provide "per socket" buffer pools which improve performance by allowing each socket to pool a small number of buffers for later re-use and therefore avoid accessing a buffer allocator. Normally the socket's pool will only be accessed from a single thread and so this reduces contention for the shared buffer allocator.
  • Added JetByteTools::IO::IBuffer::SetMaxRead() which will limit the amount of data that can be read into a buffer on the next read - it temporarily reduces the buffer's available space. This can be used if you will immediately split a buffer into pieces if it contains more than one message and if you know the size of the message that you're reading and it happens to be smaller than your buffer size.
  • Added JetByteTools::IO::IBuffer::ReadCompleted() which is used in place of JetByteTools::IO::IBuffer::Use() when a read completes.
  • Added JetByteTools::IO::IBuffer::SetOperationData(), JetByteTools::IO::IBuffer::GetOperationData() and JetByteTools::IO::IBuffer::GetOperationSequenceNumber() which are used by the SocketTools library's operation queueing code.
  • Added JetByteTools::IO::IBuffer::IsReadOnly() and JetByteTools::IO::IBuffer::GetWritableBuffer(). These are mainly for use when you want to change a buffer's contents but the buffer could be a read only buffer, such as a JetByteTools::IO::CBufferHandle. They allow you to safely convert the read only buffer to a writable one (by making a copy of the data in a new buffer).
  • Added JetByteTools::IO::IManageBufferHandleLifeCycle which is used by JetByteTools::IO::CBufferHandle to allocate a normal buffer when converting from read only to writable.
  • Added a constructor to JetByteTools::IO::CBufferAllocator which turns off buffer reference tracking for buffers created from the allocator - use with care.
  • JetByteTools::IO::CTLSBufferAllocator has been deprecated and is no longer available unless you define JETBYTE_DEPRECATE_TLS_BUFFER_ALLOCATOR to 0 in Config.h. This class is viewed as being of limited use now that per socket pooling is available.
  • JetByteTools::IO::CLowContentionBufferAllocator has been deprecated and is no longer available unless you define JETBYTE_DEPRECATE_LOW_CONTENTION_BUFFER_ALLOCATOR to 0 in Config.h. This class is viewed as being of limited use now that per socket pooling is available.
  • Removed the optional "spin count" argument to the JetByteTools::IO::CBufferAllocator constructor. The allocator now uses the new JetByteTools::Win32::CLockableObject as a lock and this does not support setting a spin count. Besides, the varied lock hold times within the allocator always meant that setting a useful spin count was difficult to achieve.
  • Added JetByteTools::IO::IIterateableBufferChain which both JetByteTools::IO::CBufferChain and JetByteTools::IO::CSortedBufferChain implement. This allows you to perform a non-destructive walk along a buffer chain.
  • JetByteTools::IO::IBufferChain::Purge() now returns the number of buffers purged.
  • Added JetByteTools::IO::IBufferChain::TotalBytes() and JetByteTools::IO::IBufferChain::GetTotalBytesAndAvailableSpace().
  • Added various "Try" versions of the Add and GetNext functions in JetByteTools::IO::IBufferChain. These can only really fail for sorted buffer chains and do so if the sequence number of the buffer about to be inserted is already present in the chain.
  • All buffers now have a default user data slot which can be used to chain them together in a buffer chain. This generally precludes the need to allocate custom user data slots for buffer chains unless you need to store a single buffer in multiple chains (for which you would need a unique user data slot per chain). Buffer chain constructors now take a default value for the user data slot to use.
  • JetByteTools::IO::CBufferChainStoresNulls now uses the "extra space" in the aligned pointers for instances of JetByteTools::IO::IBuffer (see above for alignment requirements) to store the count of "null buffers" between actual buffers. This removes the need for it to use a second user data slot just for this purpose.
  • Added static functions JetByteTools::IO::CBufferChain::AddDataToBufferChain() which allows you to add data to an existing chain of buffers and will expand the chain to contain the new data if necessary.
  • Added static function JetByteTools::IO::CBufferChain::ConsolidateData() which takes a buffer chain and moves data around to use the least number of buffers.
  • Added support for user data to JetByteTools::IO::CBufferHandle. This means that each handle can have its own user data.
  • JetByteTools::IO::CBufferReferenceTracker has been tuned a little with regards to custom context depths for some functions and now supports the concept of "instances". See the release notes for the Win32Tools lib, especially JetByteTools::Win32::CReferenceTracker. The number of instances supported can be configured in Config.h by defining JETBYTE_BUFFER_TRACKING_INSTANCES which defaults to 1. Note that tracking multiple instances increases the amount of memory required when tracking references and so multiple instances should only be turned on when required.
  • Added JetByteTools::IO::IAllocateBuffers::AllocateDefaultUserDataIndices() which should be called by all buffer allocators to set up the default user indices that all buffers must support.
  • Removed the optional bool forceDispatchToPool from the JetByteTools::IO::IAsyncIOStream::Write() methods.
  • Added an overload to JetByteTools::IO::IAsyncIOStream::Write() which takes an JetByteTools::IO::IIterateableBufferChain of buffers. This can allow for efficient management of the locks required to build and send a series of buffers in one write.
  • Added some helper functions to JetByteTools::IO::IBuffer which help with dealing with the alignment required for all instances of the class and also help access the 'pointer' and the 'extra space' that we're using in pointers to instances of this interface.
  • Added JetByteTools::IO::IBuffer now has a constructor which validates that derives classes are aligned as expected.
  • Added JetByteTools::IO::IIOPool::GetNumberOfThreads() and JetByteTools::IO::IIOPool::DispatchToAll().
  • Added JetByteTools::IO::CIOPoolBase::GetNumberOfThreads() and JetByteTools::IO::CIOPoolBase::DispatchToAll(). These are only intended to be used to dispatch a CancelIo() request to all threads in an I/O thread pool - this is required by a bug fix for XP (which doesn't have CancelIoEx()). Note that JetByteTools::IO::IIOPool::DispatchToAll() is likely to exhibit poor performance characteristics as it needs to block threads in the I/O pool so that it can be sure to dispatch an operation to each thread. Under heavy load this will seriously affect the scalability of the I/O pool.
  • Added JetByteTools::IO::IMonitorIOPool::OnIOPoolThreadStarted() and JetByteTools::IO::IMonitorIOPool::OnIOPoolThreadStopped() both of which are called from the thread in question.
  • Added JetByteTools::IO::IMonitorIOPool::OnIOPoolWorkItemsDequeued().
  • Changed the content of some exception messages from JetByteTools::IO::CInOrderBufferList.
  • Added JETBYTE_DEPRECATE_IN_ORDER_BUFFER_LIST which currently defaults to 0 and which, when defined to 1, removes the JetByteTools::IO::CInOrderBufferList from the source tree. You should replace usages of this class with one of the buffer processors, probably JetByteTools::IO::CSortedBufferProcessor. The define is currently only present to aid in locating and removing all usages of the list. It will actually be deprecated in the next release.
  • Added JetByteTools::IO::CIOPoolEx which is an I/O pool which uses GetQueuedCompletionStatusEx() to retrieve multiple completions in one call. Moved most of the common code into JetByteTools::IO::CIOPoolBase which JetByteTools::IO::CIOPool also now derives from.
  • Added JetByteTools::IO::IProvideWorkItems::GetNextWorkItems() and JetByteTools::IO::IProvideWorkItems::PutBackWorkItems().
  • Bug fix in JetByteTools::IO::CRotatingAsyncFileLog where we now obtain the log's lock before setting the state to shutting down in the destructor. This prevents a race condition that was discovered in testing.
  • Added an optional argument to the constuctor of JetByteTools::IO::CSortedBufferChain which allows you to pass in a function that obtains the sequence number from the buffer. This defaults to a function which uses the buffer's internal sequence number but you could alternatively use a function which returns the buffer's operation sequence number.
  • Added JetByteTools::IO::CSortedBufferChain::NumConsecutiveBuffers() which returns the number of buffers which can be processed before the chain will need to halt processing whilst awaiting a buffer of the correct sequence number. This will always be less than or equal to JetByteTools::IO::CSortedBufferChain::Size()
  • Added JetByteTools::IO::CSortedBufferProcessor which adds the ability to set the initial sequence number and reset the underlying sorted buffer chain.
  • Bug fixes to JetByteTools::IO::CUnsortedBufferProcessor to allow correct operating with JetByteTools::IO::CBufferChainStoresNulls.
  • Bug fix to JetByteTools::IO::CBuffer when socket reference tracking is enabled, but references for a particular buffer are not being tracked.
  • Bug fix to the change from 6.5.9 to allow it to compile on Visual Studio 2005 with no platform SDK installed - a cast is required to resolve ambiguity with InterlockedIncrement().
  • You can now call JetByteTools::IO::CBufferAllocator::RequestUserDataSlot() (and the equivalent on all other buffer allocators) after a socket has been allocated by the allocator to obtain the index of a user data slot that has been registered before the user data indices were locked.
  • Bug fix to JetByteTools::IO::CBuffer::ConsumeAndRemove() and JetByteTools::IO::CLockFreeBuffer::ConsumeAndRemove(). We now correctly return false if m_used, m_startOffset and bytesToRemove are all 0.
  • Added JetByteTools::IO::CBufferChainStoresNulls::Dump() which is used within the unit tests and handy for debugging odd situations...
  • Added support for JetByteTools::IO::CBufferHandle::AllocateNewBuffer() to allocate a buffer if it can, rather than always throwing an exception.
  • Added JetByteTools::IO::CInputFilterProcessor and JetByteTools::IO::IProcessingInputFilterProcessor, which reduce the complexity of processing input whilst maintaining two lists of buffers (filled data buffers and pending empty buffers) without locking during processing. We only lock when buffers are added to the lists. Currently only used in the WebSockets code but relevant to all input filters.

Version 6.5.9
  • No changes.

Version 6.5.8
  • Reduced the size of IBuffer::SequenceNumber from size_t to unsigned long. This is related to the bug fix in JetByteTools::Socket::CSequencedStreamSocket::SequenceData.
  • Added some more information to the exceptions thrown from JetByteTools::IO::CInOrderBufferList.

Version 6.5.7
  • Updated our support of Visual Studio 2012 to the RTM version. Added a few more warning suppressions. Fixed the solution file format so that it's actually a 2012 solution file and not a 2010 solution file using the 2012 tool chain.

Version 6.5.6
  • Updated our support of Visual Studio 2012 (11) to the RC version. Added a few more warning suppressions. Renamed the output directories. Renamed the solutions and projects from .11. to .2012.

Version 6.5.5
  • Fixed some warnings generated by /analyze.
  • Bug fix. Removed the exception thrown in JetByteTools::IO::CAsyncFileWriter::HandleWriteRequest() when JETBYTE_FILE_WRITER_SKIP_COMPLETION_PORT_ON_SUCCESS is enabled.
  • Bug fix. Correctly track read completions in JetByteTools::IO::CAsyncFileReader::IssueReadRequest() when JETBYTE_FILE_WRITER_SKIP_COMPLETION_PORT_ON_SUCCESS is enabled.

Version 6.5.4
Version 6.5.3
  • No changes.

Version 6.5.2
Version 6.5.1
  • Fixed a typo in the text of an exception.

Version 6.5
  • Added a variation of JetByteTools::IO::IBuffer::SplitBufferFromFront() which takes a start offset and a length so that you can remove `start + length` from the source buffer and end up with `length` in the destination buffer.
  • Added JetByteTools::IO::IBuffer::Consume() which moves a 'start offset' inside the buffer but does not move the data as JetByteTools::IO::IBuffer::ConsumeAndRemove() does.
  • JetByteTools::IO::IBuffer::ConsumeAndRemove() now returns true if the buffer is empty after the bytes are removed.
  • Added JetByteTools::IO::IBuffer::MakeSpaceAtFront() which will either give you back space that was previously consumed with JetByteTools::IO::IBuffer::Consume() OR will copy the esisting buffer contents along in the buffer to make more space at the start.
  • Added JetByteTools::IO::IBufferBase::ReduceUsed() which will remove bytes from the end of the buffer.
  • Added buffer chains and buffer processors. These are intended to be a more flexible and performant replacement to JetByteTools::IO::CInOrderBufferList, JetByteTools::IO::CBufferList, and JetByteTools::IO::CSequentialBufferList. Buffer chains build a singly linked list of buffers using a user data slot for the next pointer. As such they do not require additional memory to be allocated or released when performing operations on the chains. JetByteTools::IO::CBufferChain is a simple list from which you can add to the front or back and which can have items removed from the front. JetByteTools::IO::CBufferChainStoresNulls is similar to JetByteTools::IO::CBufferChain except that it keeps track of null pointers as well as buffers, use JetByteTools::IO::CBufferChainStoresNulls::IsEmpty() or JetByteTools::IO::CBufferChainStoresNulls::Size() to tell you when the chain is empty as JetByteTools::IO::CBufferChainStoresNulls::GetNext() can return null to indicate that a null pointer was inserted into the chain at that point. JetByteTools::IO::CSortedBufferChain is a list that stores the buffers in ascending sequence number order; much like JetByteTools::IO::CInOrderBufferList does. Buffer processors, such as JetByteTools::IO::CBufferProcessor, JetByteTools::IO::CLockableBufferProcessor and JetByteTools::IO::CUnsortedBufferProcessor provide the 'processing' functionality of JetByteTools::IO::CInOrderBufferList with buffer chains. A JetByteTools::IO::CBufferProcessor given a JetByteTools::IO::CSortedBufferChain to work on provides the same functionality as a JetByteTools::IO::CInOrderBufferList without any of the memory allocation overhead required for adding and removing elements.
  • Increased the size of the type used to store the number of buffers that can be pooled in a buffer allocator from unsigned short to unsigned long.
  • Added JetByteTools::IO::CSequentialBufferList::AddBuffer() and JetByteTools::IO::CSequentialBufferList::AddBufferToFront().
  • Added JetByteTools::IO::CNonPooledBuffer a buffer that isn't pooled...

Version 6.4
Version 6.3.3
  • No changes.

Version 6.3.2
  • No changes.

Version 6.3.1
  • No changes.

Version 6.3
  • Lots of white space changes which make comparing actual changes with 6.2 quite hard. Sorry.
  • Added JetByteTools::IO::IBuffer::CLowContentionBufferAllocator which is a pool of allocators which are used in a round robin style to allocate buffers. This needs very careful tuning with regards to the number of allocators and the number of threads to actually work properly but it can give quite a performance gain in some circumstances. See here for more details.
  • Added JetByteTools::IO::IBuffer::WeOwnOnlyReference() which returns true when the reference count of a buffer is 1.
  • Added the concept that the buffer allocator that was used to allocate a given buffer might be different to the allocator that it uses when JetByteTools::IO::IBuffer::Allocate() and JetByteTools::IO::IBuffer::DuplicateBuffer() are called. This allows for some optimisations in the JetByteTools::IO::CLowContentionBufferAllocator to be more efficient.
  • Added JetByteTools::IO::CBufferAllocator::SetAllocatorForBufferToUse() which can be used to set the buffer allocator that is passed to buffer instances for use when allocating new buffers. This allows for some optimisations in the JetByteTools::IO::CLowContentionBufferAllocator to be more efficient.
  • Added an optional performance optimisation for JetByteTools::IO::CBufferAllocator. Define JETBYTE_PERF_NO_ACTIVE_BUFFER_LIST to 1 in your Config.h and the allocator doesn't maintain an active buffer list. This improves performance fractionally.
  • Breaking Change JetByteTools::IO::IMonitorBufferAllocation now has two new functions. OnBufferAllocationContention() and OnBufferReleaseContention() these are called if monitoring of contention during buffer allocation and release in JetByteTools::IO::CBufferAllocator is enabled by defining JETBYTE_PERF_BUFFER_ALLOCATION_CONTENTION_MONITORING to 1 in your Config.h.
  • Added JetByteTools::IO::CBufferList::Begin() and JetByteTools::IO::CBufferList::End() to enable traversal of the buffers that are stored in the buffer list.
  • Added JetByteTools::IO::IHandleFileCreationFailure which is used by JetByteTools::IO::CRotatingAsyncFileLog to enable you to recover from failures to open files. You can change the file name if required or tell the calling code not to retry the operation.
  • Added JetByteTools::IO::CRetryAndRenameFileCreationFailureHandler which implement JetByteTools::IO::IHandleFileCreationFailure and allows a configurable number of reties with a configurable length of delay between them and the option to rename the file that's being created.
  • Added JetByteTools::IO::IManageWorkerThreads which allows worker threads to call back to their creator to signal initialisation and shutdown.
  • Breaking Change JetByteTools::IO::IMonitorIOPool has a new function, OnIOPoolDispatch() which is called when an operation is manually dispatched to an I/O pool thread. Note that this is not called for automatically dispatched I/O completions.
  • JetByteTools::IO::IOPool now passes an instance of JetByteTools::IO::IManageWorkerThreads to its worker threads which means that they can call back to it when they initialise and shutdown. This allows derived classes to override these methods to provide per thread initialisation which occurs on the worker thread itself. Useful for initialising COM or whatever on the threads in the I/O pool.
  • Added JetByteTools::IO::CLockFreeBufferAllocator::EnlargePool() so that you can enlarge the pool of buffers before use.

Version 6.2
  • Fixed a race condition bug in JetByteTools::IO::CAsyncFileWriter where the interaction between the class destructor and/or the notification generated by a final write completing could cause destruction problems either with regard to the writer being deleted before the callback returns or the class being deleted before the final write notification had been completed; this all pretty much depended on how you waited for the final write when cleaning up the file writer.
  • Added JetByteTools::IO::IBuffer::DuplicateBuffer() which allocates a new buffer from the same allocator used by the existing buffer and copies the existing data into the new buffer before returning it.
  • We now check for numeric overflow when we're calculating the total size of the buffers in JetByteTools::IO::CMultiBufferHandle::GetUsed().
  • Fixed a bug in JetByteTools::IO::CAsyncFileWriter::HandleWriteRequest() which could cause a race condition between the buffer allocator's destruction and the last operation that we perform on a buffer that has been allocated from it. Basically we signal that the last write is complete after we've finished fiddling with the buffers that we've been using.
  • Added conditional code to allow FILE_SKIP_SET_EVENT_ON_HANDLE and FILE_SKIP_COMPLETION_PORT_ON_SUCCESS to be enabled on the file handle used by JetByteTools::IO::CAsyncFileWriter. See the JETBYTE_PERF_FILE_WRITER_SKIP_EVENT_ON_HANDLE and JETBYTE_PERF_FILE_WRITER_SKIP_COMPLETION_PORT_ON_SUCCESS configuration options in Config.h
  • Added conditional code to allow FILE_SKIP_SET_EVENT_ON_HANDLE and FILE_SKIP_COMPLETION_PORT_ON_SUCCESS to be enabled on the file handle used by JetByteTools::IO::CAsyncFileReader. See the JETBYTE_PERF_FILE_READER_SKIP_EVENT_ON_HANDLE and JETBYTE_PERF_FILE_READER_SKIP_COMPLETION_PORT_ON_SUCCESS configuration options in Config.h
  • Fixed JetByteTools::IO::CBufferAllocator::RequestUserDataSlot() so that it only checks to see if the index collection is locked if an exception is thrown whilst manipulating it.
  • Removed <wtypes.h> from IAsyncIOStream.h
  • Added JetByteTools::IO::CInOrderBufferList::SetInitialSequenceNumber() and allow the initial sequence number to be passed into the constructor.
  • Fixed JetByteTools::IO::CInOrderBufferList sequence number wrap issues.
  • Breaking Change All instances of InitiateShutdown() have been changed to BeginShutdown() this is to remove the issue with the Win32 InitiateShutdown() function which is conditionally defined as either InitiateShutdownA() or InitiateShutdownW() and which could then cause issues. The following classes are affected:
    • JetByteTools::IO::IOPool

Version 6.1.1
  • Fixed a bug in JetByteTools::IO::CRotatingAsyncFileLog which could cause the date stamp for a log file to end up with a date of 16010101. See here http://www.lenholgate.com/archives/000880.html for more details.
  • Fixed a bug in JetByteTools::IO::CRotatingAsyncFileLog which caused the timestamp in the log to include 4 charactes for the milliseconds rather than 3 resulting in 0999 rather than 999.
  • Changed how JetByteTools::IO::CBufferReferenceTracker works. You can now get it to include additional call stack context by defining JETBYTE_ADDITIONAL_BUFFER_TRACKING_CONTEXT (in Config.h) to the number of additional frames of context that you require.

Version 6.1
  • Added the ability to restrict the number of pending writes for an instance of JetByteTools::IO::CAsyncFileWriter. You can now specify a maxPendingWrites in the constructor and if this is not 0 then a semaphore is created and used to control the number of writes that can be pending at any one time. When the maximum number of writes are pending the dispatch of new writes is delayed and writes effectively become synchronous. This can be used to prevent unconstrained resource usage.
  • Added JetByteTools::IO::CAsyncFileWriter::Callback::OnPendingWriteLimit() which is called each time the file writer reaches the limit of pending writes that it can have outstanding at any one time.
  • Added the ability to specify a pending write limit to the JetByteTools::IO::CAsyncFileWriter that is used by JetByteTools::IO::CRotatingAsyncFileLog.
  • Added the ability to specify a pending write limit to the JetByteTools::IO::CAsyncFileWriter that is used by JetByteTools::IO::CAsyncFileLog.
  • Fixed a race condition in how reads were issued by JetByteTools::IO::CAsyncFileReader.
  • Added a configuration option, JETBYTE_TRACK_IO_BUFFER_REFERENCES which when defined as 1 causes code to be inserted that tracks the reference counting that occurs on instances of JetByteTools::IO::CBuffer. If a buffer is over released (i.e. release is called on a buffer where the reference count is currently zero) then a trace of all calls to JetByteTools::IO::CBuffer::AddRef() and JetByteTools::IO::CBuffer::Release() will be printed to the debug trace output. If a buffer is destroyed and the reference count is not zero then a trace is also printed. Note that there is a considerable run-time cost for this functionality but it is non invasive and no external code changes are needed. See here http://www.lenholgate.com/archives/000867.html for more details.
  • Added JetByteTools::IO::CBufferReferenceTracker which is used to implement the reference tracking code that is detailed above.
  • Added the ability to specify that JetByteTools::IO::CBufferAllocator should allocate buffers using VirtualAlloc() with the additional option to allocate buffers on page boundaries. This can be useful if you want to control, exactly, the number of pages that your buffers use so that you can reduce the number of pages locked during I/O operations. Note that the allocator used is pretty simplistic and that it doesn't return memory to the operating system until the allocator is destroyed. See here http://www.lenholgate.com/archives/000853.html for more details.
  • Added JetByteTools::IO::CBufferList which is a list which can contain instances of JetByteTools::IO::IBuffer and offsets and data lengths within them. A contiguous view onto these buffers can then be obtained. For example, if you add buffer 1 with an offset of 10 and a length of 10 and then buffer 2 with an offset of 12 and a length of 12 the value returned from JetByteTools::IO::CBufferList::GetTotalDataLength() will be 22 and the memory returned from JetByteTools::IO::CBufferList::GetContiguousMemory() will include 10 bytes of data from buffer 1 starting at offset 10 and 12 bytes from buffer 2 starting at ofset 12. This can be useful for combining fragmented network messages where each message buffer also contains a header that needs to be skipped.
  • Added JetByteTools::IO::CSmartBufferList which is a 'smart pointer' for pointers to JetByteTools::IO::CBufferList.
  • Changed JetByteTools::IO::IAllocateBuffers::Flush() so that it returns a bool. The function now returns true if there were buffers present when the allocator was flushed.
  • Added the ability to specify to an instance of JetByteTools::IO::CBufferAllocator that you don't want it to pool buffers at all.

Version 6.0
  • Changes due to the merging of C++Tools and RegistryTools with Win32Tools.
  • JetByteTools::IO::CAsyncFileLog::LogMessage() now uses the version of sprintf_s that takes the length of the destination buffer.
  • Added JetByteTools::IO::CAsyncFileWriter::GetFileNameIfKnown() which returns the name of the file being written to if it's known; note that at present we do not attempt to find out the name of file handles which are passed to us so we only return the file name if the file name was passed to us in the constructor.
  • Added JetByteTools::IO::CAsyncFileWriter::GetFileSize() which returns the current size of the file being written to.
  • Added JetByteTools::IO::CRotatingAsyncFileLog::GetCurrentLogFileName() which returns the full name of the current log. This is useful as otherwise it's non-trivial to work out the name of a log that may include time and date details.
  • Changes to JetByteTools::IO::IMonitorBufferAllocation::OnBufferAllocated() and JetByteTools::IO::IMonitorBufferAllocation::OnBufferReleased(), they both now get passed the buffer's user data so that they can be used to add or remove user data from buffers.
  • JetByteTools::IO::CRotatingAsyncFileLog can now be configured to delete empty log files when a new log file is created. This means that only the log files that contain logged messages are kept.
  • Added JetByteTools::IO::CSmartBuffer, this was previously available as JetByteTools::Socket::CSmartBuffer but it should have always been in the IO namespace.
  • Added JetByteTools::IO::SplitBufferFromBack(), this is a more efficient way of splitting a buffer than calling JetByteTools::IO::IBuffer::SplitBufferFromFront() as it results in less memory copying; however it returns the data that was removed from the current buffer and leaves the current buffer with the remaining data in it which is the opposite to how JetByteTools::IO::IBuffer::SplitBufferFromFront() works.
  • Breaking Change Renamed JetByteTools::IO::IBuffer::SplitBuffer() to JetByteTools::IO::IBuffer::SplitBufferFromFront(). In most cases it would probably be better to use JetByteTools::IO::SplitBufferFromBack() rather than JetByteTools::IO::IBuffer::SplitBufferFromFront() but this requires code changes.

Version 5.2.5
  • No changes.

Version 5.2.4
  • We now compile with /Wall (in VS2005 and later) to enable all warnings, even those that are disabled by default.
  • Added JetByteTools::IO::CAsyncFileWriter::NotifyOnNoWrites() which can be used to call you back when the last pending overlapped write completes. This can then be used to allow 'overlapped' waiting for the final write so that you don't have to block a thread to wait for all writes to complete before deleting a writer.
  • Added JetByteTools::IO::IAllocateMultiBuffersHandles, JetByteTools::IO::CMultiBufferHandle and JetByteTools::IO::CMultiBufferHandleAllocator. These allow you to issue 'scatter/gather' style writes. You might have a fixed header and trailer buffer, and a changeable third buffer and with a multi-buffer handle you can issue one write to write all of them. See the Multi Buffer Write example server for details of how to use these classes.
  • Added JetByteTools::IO::CRotatingAsyncFileLog which is a log file which with a date and time related name which will close one instance of the log and open a new one with a new name at regular intervals. You can use this to automatically create a new log each hour, day week, etc.
  • Added JetByteTools::IO::CBufferAllocator::LockUserDataSlots() and JetByteTools::IO::CLockFreeBufferAllocator::LockUserDataSlots() as required by the change to JetByteTools::Win32::IProvideUserData.
  • The constructor for JetByteTools::IO::CBufferHandle are now protected, buffer handles should be allocated via an allocator.

Version 5.2.3
  • Some whitespace changes to remove incorrect tabs.
  • Added JetByteTools::IO::CBufferHandleAllocator. This provides a pooling allocator for JetByteTools::IO::CBufferHandle objects. Buffer handles are used to broadcast data to multiple clients without needing to copy the data into separate buffers.
  • Added JetByteTools::IO::CJobEventManager. This works with the job object support in the Win32 Tools Library to provide an event manager which can work with a JetByteTools::IO::IIOPool.
  • Fixed a memory leak in JetByteTools::IO::CMemoryInputOutputStream where we were using delete rather than delete [].
  • Added JetByteTools::IO::CInOrderBufferList::Size() which returns the number of buffers in the list.
  • Added JetByteTools::IO::IBuffer::GetWSABUFCount(). This returns the number of WSABUFs in the array returned by JetByteTools::IO::IBuffer::GetWSABUF(). At present all buffer implementations return 1 for this, but this will allow for buffers which support 'scatter/gather' style multiple buffer writes.
  • Added JetByteTools::IO::IAllocatableBuffer which goes some way to being able to share the pooling aspects of the various buffer allocators.
  • Added JetByteTools::IO::CIOPool::SetThreadName() which allows you to change the name of the worker threads that are managed by the pool. The constructor now sets the name of these threads to "IOPool" by default. Note that this must be called before calling JetByteTools::Win32::CIOPool::Start() for it to have an effect.

Version 5.2.2
Version 5.2.1
  • VS 2008 support - Adding projects and solutions and excluding warning 4627...
  • This is the first release built using continuous integration, some project file fixes to fix incorrect output directories, etc so that x64 and x86 builds can be done in complete isolation.
  • Bug fix in JetByteTools::IO::CAsyncFileWriter to release the buffer that was used during a write before we signal that the write is complete, this prevents a resource leak or crash when the destructor is waiting for the final write to complete before cleaning up.

Version 5.2
  • x64 port - Some data types have changed...
  • Some tightening up on const.
  • Added JetByteTools::IO::CAsyncFileLog which is a high performance implementation of the JetByteTools::ILogMessages interface.
  • Added JetByteTools::IO::IStream which is a bit of a hack, it's just a place to scope a useful data type.
  • If JETBYTE_HAS_INTERLOCKED_64 (see Admin.h) is defined to 1 the JetByteTools::IO::CAsyncFileWriter will use interlocked operations, rather than a critical section, to manipulate the file write offset.
  • JetByteTools::IO::CAsyncFileWriter now supports a simple 'gather' style version of Write() which can write multiple buffers in a single call.

There were no release notes for this library prior to version 5.2

Generated on Sun Sep 12 19:06:45 2021 for The Server Framework - v7.4 by doxygen 1.5.3