Latest release of The Server Framework: 6.7
Version 6.7 of The Server Framework was released today.
This release is mainly a code simplification release which removes support for legacy compilers and operating systems. See here for more details. However, there are some breaking changes where smart buffers have replaced buffer references and this causes function signature changes. In addition there has been considerable churn in the Streaming Media Option Pack with knock on changes in the HTTP library code which needed to be made more complete to deal with serving HLS streams.
As always, see the release notes here, for full details of all changes.
Breaking changes:
- Breaking change
JetByteTools::IO::CAsyncFileReader
,JetByteTools::IO:: CAsyncFileWriter
,JetByteTools::IO::CAsyncFileWriterEx
andJetByteTools::IO::IAsyncIOStream
now work in terms ofJetByteTools::IO:CSmartBuffer
where possible. This potentially reduces the reference counting activity on the buffers. - Breaking change Where possible
JetByteTools::IO::CSmartBuffer
has replaced raw pointers and references to buffers. This massively reduces the need to reference count buffers during normal I/O operations and increases performance, especially on NUMA architectures.
Bug fixes:
- Bug fixes to
JetByteTools::IO::CBuffer
around the usage ofm_maxBytesToRead
. - Bug fix to
JetByteTools::Win32::CCallbackTimerQueueEx::BeginTimeoutHandling()
to prevent incrementingm_nextTimeoutHanlde
causing the value to wrap toInvalidTimeoutHandleValue
which was possible, but unlikely.
Changes:
-
Dropped support for Visual Studio 2005 and Visual Studio 2008.
-
Dropped support for Windows XP.
-
Removed
JETBYTE_HAS_INTERLOCKED_64
as it’s true on all supported platforms now. -
Removed
JETBYTE_WARN_ON_SOCKADDR_STORAGE_DEF
andJETBYTE_WARN_ON_WSPIAPI_COUNTOF_DEF
as these are no longer relevant. -
Removed
JETBYTE_PERF_STREAM_SOCKETS_SKIP_EVENT_ON_HANDLE
,JETBYTE_PERF_DATAGRAM_SOCKETS_SKIP_EVENT_ON_HANDLE
andJETBYTE_PERF_FILE_WRITER_SKIP_EVENT_ON_HANDLE
as these are always enabled now. -
Removed
JETBYTE_PERF_STREAM_SOCKETS_SKIP_MARSHAL_TO_IO_POOL
andJETBYTE_PERF_DATAGRAM_SOCKETS_SKIP_MARSHAL_TO_IO_POOL
as these are always enabled now. Marshalling was only required to work around Windows XP’s I/O cancellation on thread termination policy. -
Removed
JETBYTE_DEPRECATE_SHARED_CRITICAL_SECTIONS
,JETBYTE_DEPRECATE_SHARED_LOCK_SOCKETS
,JETBYTE_DEPRECATE_CRITICAL_SECTION_2
,JETBYTE_DEPRECATE_LOW_CONTENTION_BUFFER_ALLOCATOR
, andJETBYTE_DEPRECATE_TLS_BUFFER_ALLOCATOR
as these features are no longer available. -
Removed
SecureCRT.h
as it’s no longer required. It was used to map differences between the Visual Studio 2005 CRT and the “new” secure CRT. -
Added the macro,
SuppressLNK4221Warning()
, which can be put into a file in order suppress the MS Visual C++ Linker warning 4221 - “warning LNK4221: no public symbols found; archive member will be inaccessible” -
Turn off
JETBYTE_INTRUSIVE_RED_BLACK_TREE_INTERNAL_STATE_FAILURE_EXCEPTIONS
by default. -
Removed
JetByteTools::IO::CLowContentionBufferAllocator
andJetByteTools::IO::CTLSBufferAllocator
. -
Added
JetByteTools::IO::CBufferBasedBufferAlloctor
which is a simple shim to allow an instance ofJetByteTools::IO::IBuffer
to be used as an implementation ofJetByteTools::IO::IAllocateBuffers
. -
Removed
JetByteTools::IO::IIOPool::DispatchToAll()
as it was only required for issuingCancelIO()
calls to all I/O threads on XP whereCancelIOEx()
wasn’t available. -
Added an overload of
JetByteTools::IO::CNonPooledBuffer::Create()
that takes abufferSize
and a pointer to data and a data length so that you can create a buffer that initially contains some data but that is larger than that data. -
Added lots of standard buffer functionality to
JetByteTools::IO::CNonPooledBuffer
before deprecating it in favour of normal buffers obtained viaJetByteTools::IO::IAllocateBuffers::AllocateCustomSizedBuffer()
. -
Removed
JetByteTools::IO::CAsyncFileWriter::ExecuteWritesOnCallingThreadIfSafe
as it’s the same asJetByteTools::IO::CAsyncFileWriter::ExecuteWritesOnCallingThread
now that we no longer support Windows XP. -
Added
JetByteTools::IO::IBuffer::GetTotalLength()
which returns the length of a set of buffers defined using an array ofWSABUF
structures. -
Added
JetByteTools::IO::CBufferChain::CopyBufferChain()
which uses an instance ofJetByteTools::IO::CBufferChain::IAllocateBufferHandles
to create a duplicate of a given buffer chain where the duplicate contains handles to the buffers in the original chain. -
Removed all of the code that was required to marshall I/O operations to the I/O threads on Windows XP.
-
Removed the concept of write sequencing. There’s no need now that the marshalling code has been removed.
-
Removed the concept of “shared lock sockets” and, correspondingly “unique lock sockets”. All socket objects now have their own lock.
-
Removed the option of setting a socket’s lock’s
spinCount
in the constructor of the socket allocator -
Replaced some usages of
JetByteTools::Win32::CCriticalSection
withJetByteTools::Win32::CLockableObject
-
Removed
JetByteTools::Win32::ICriticalSectionFactory
,JetByteTools::Win32::ISharedCriticalSection
,JetByteTools::Win32::IManageSharedCriticalSections
,JetByteTools::Win32::CCriticalSection2
,JetByteTools::Win32::CSharedCriticalSection
,JetByteTools::Win32::CSharedCriticalSectionFactory
,JetByteTools::Win32::CSmartSharedCriticalSection
andJetByteTools::Win32::CUniqueCriticalSectionFactory
. The concept of shared critical sections is no longer supported. -
Removed
JetByteTools::Win32::CThreadedCallbackTimerQueue::HybridTickCount64
andJetByteTools::Win32::CThreadedCallbackTimerQueue::HybridTickCount64NoLock
as the hybridGetTickCount64()
implementation is no longer required as all supported platforms now provideGetTickCount64
. -
Removed
JetByteTools::Win32::CCallbackTimerQueue
.JetByteTools::Win32::CCallbackTimerQueueEx
is now the only timer queue implementation. -
Removed
JETBYTE_USE_CAPTURE_STACK_BACK_TRACE
we now ALWAYS usedCaptureStackBackTrace()
so there’s no need to make it optional. -
Added new overloads for
JetByteTools::Win32::GetFileNameFromPathName()
andJetByteTools::Win32::StripFileNameFromPathName()
which takes the path separator. This allows the functions to be used for file system paths or URI paths. -
Added new overloads for
JetByteTools::Win32::GetFileVersion()
andJetByteTools::Win32::GetFileVersionString()
which take languge IDs and charset IDs -
Added
JetByteTools::Win32::RemoveDirectoryContents()
. -
Added
JetByteTools::Win32::GetFileSize()
. -
Added some code to the top and bottom of Utils.h which try to deal with situations where min and max have been defined as macros. We use the std::min() and std::max() template versions and macros confuse matters so the new code attempts to undef the macros if present and then redefine them at the end of the header.
Newly deprecated code:
- Deprecated
JetByteTools::IO::IAllocateMultiBufferHandles
and the concept of “multi buffer handles”. - The stacking of connection filters that can generate their own writes has been deprecated.
- Compressing and deflating socket filters are now deprecated.