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::CAsyncFileWriterExandJetByteTools::IO::IAsyncIOStreamnow work in terms ofJetByteTools::IO:CSmartBufferwhere possible. This potentially reduces the reference counting activity on the buffers. - Breaking change Where possible
JetByteTools::IO::CSmartBufferhas 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::CBufferaround the usage ofm_maxBytesToRead. - Bug fix to
JetByteTools::Win32::CCallbackTimerQueueEx::BeginTimeoutHandling()to prevent incrementingm_nextTimeoutHanldecausing the value to wrap toInvalidTimeoutHandleValuewhich was possible, but unlikely.
Changes:
-
Dropped support for Visual Studio 2005 and Visual Studio 2008.
-
Dropped support for Windows XP.
-
Removed
JETBYTE_HAS_INTERLOCKED_64as it’s true on all supported platforms now. -
Removed
JETBYTE_WARN_ON_SOCKADDR_STORAGE_DEFandJETBYTE_WARN_ON_WSPIAPI_COUNTOF_DEFas these are no longer relevant. -
Removed
JETBYTE_PERF_STREAM_SOCKETS_SKIP_EVENT_ON_HANDLE,JETBYTE_PERF_DATAGRAM_SOCKETS_SKIP_EVENT_ON_HANDLEandJETBYTE_PERF_FILE_WRITER_SKIP_EVENT_ON_HANDLEas these are always enabled now. -
Removed
JETBYTE_PERF_STREAM_SOCKETS_SKIP_MARSHAL_TO_IO_POOLandJETBYTE_PERF_DATAGRAM_SOCKETS_SKIP_MARSHAL_TO_IO_POOLas 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_ALLOCATORas these features are no longer available. -
Removed
SecureCRT.has 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_EXCEPTIONSby default. -
Removed
JetByteTools::IO::CLowContentionBufferAllocatorandJetByteTools::IO::CTLSBufferAllocator. -
Added
JetByteTools::IO::CBufferBasedBufferAlloctorwhich is a simple shim to allow an instance ofJetByteTools::IO::IBufferto 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 abufferSizeand 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::CNonPooledBufferbefore deprecating it in favour of normal buffers obtained viaJetByteTools::IO::IAllocateBuffers::AllocateCustomSizedBuffer(). -
Removed
JetByteTools::IO::CAsyncFileWriter::ExecuteWritesOnCallingThreadIfSafeas it’s the same asJetByteTools::IO::CAsyncFileWriter::ExecuteWritesOnCallingThreadnow 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 ofWSABUFstructures. -
Added
JetByteTools::IO::CBufferChain::CopyBufferChain()which uses an instance ofJetByteTools::IO::CBufferChain::IAllocateBufferHandlesto 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
spinCountin the constructor of the socket allocator -
Replaced some usages of
JetByteTools::Win32::CCriticalSectionwithJetByteTools::Win32::CLockableObject -
Removed
JetByteTools::Win32::ICriticalSectionFactory,JetByteTools::Win32::ISharedCriticalSection,JetByteTools::Win32::IManageSharedCriticalSections,JetByteTools::Win32::CCriticalSection2,JetByteTools::Win32::CSharedCriticalSection,JetByteTools::Win32::CSharedCriticalSectionFactory,JetByteTools::Win32::CSmartSharedCriticalSectionandJetByteTools::Win32::CUniqueCriticalSectionFactory. The concept of shared critical sections is no longer supported. -
Removed
JetByteTools::Win32::CThreadedCallbackTimerQueue::HybridTickCount64andJetByteTools::Win32::CThreadedCallbackTimerQueue::HybridTickCount64NoLockas the hybridGetTickCount64()implementation is no longer required as all supported platforms now provideGetTickCount64. -
Removed
JetByteTools::Win32::CCallbackTimerQueue.JetByteTools::Win32::CCallbackTimerQueueExis now the only timer queue implementation. -
Removed
JETBYTE_USE_CAPTURE_STACK_BACK_TRACEwe 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::IAllocateMultiBufferHandlesand 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.