Latest release of licensed socket server code: 5.2.4

The latest release of The Server Framework is now available. This release includes the following changes.

The following changes were made to the libraries.

Admin Library - 5.2.4

  • We no longer support Visual Studio 6.

  • We now compile with /Wall (in VS2005 and later) to enable all warnings, even those that are disabled by default. Of course this means that the list of warnings that we disable in Warnings.h has grown a little.

  • The custom message pragmas are now all prefixed with JETBYTE_, so there’s JETBYTE_TODO, etc. This is to prevent name clashes with user code.

C++ Tools Library - 5.2.4

  • Added const versions of JetByteTools::TReferenceCountedSmartPointer::Get() and JetByteTools::TReferenceCountedSmartPointer::GetRef().

  • Added JetByteTools::TReferenceCountedSmartPointer::Release().

Win32 Tools Library - 5.2.4

  • Added JetByteTools::Win32::IQueueTimers::DispatchesWithoutLock() so that you can deterime at runtime the timer dispatch policy of a queue. This can be useful to impose a requirement for lock free dispatch on an instance of the timer queue that you might be given to use. Note that this would probably better be done with an interface, so that you could specify your requirements clearly…

  • Added JetByteTools::Win32::IWaitable::WaitWithMessageLoop(), this lets you pump messages whilst waiting on a handle.

  • Added JetByteTools::Win32::IProvideUserData::LockUserDataSlots(), this allows you to force the provider to lock itself and allow no more slots to be added.

  • Added JetByteTools::Win32::CLibraryLoader::GetOptionalProcAddress() which returns null if the function doesn’t exist rather than throwing an exception.

  • Fixed a race condition bug in JetByteTools::Win32::CCallbackTimerQueueBase which is detailed here:

  • Added JetByteTools::Win32::IListenForTimeChangeNotifications and JetByteTools::Win32::CTimeChangeNotificationMonitor to allow you to monitor WM_TIMECHANGE messages.

I/O Tools Library - 5.2.4

  • 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 is protected, buffer handles should be allocated via an allocator.

Socket Tools Library - 5.2.4

  • Removed (no, really, we did this time) the ConnectionErrorSource.h header file.

  • Removed JetByteTools::Socket::IStreamSocketCallback::OnError(), the one that had a socket and a message for arguments. We now deal with errors a little better…

  • Added a version of JetByteTools::Socket::IServerControl::WaitForShutdownToComplete() that takes a timeout value and returns a bool to say if the server shut down within the timeout. This makes it easier to deal with servers that have hung for one reason or another. They now don’t have to stop the entire process from shutting down.

  • Added JetByteTools::Socket::IServerControl::ForceShutdown() which causes a server to shut down even if it would normally wait. Use with care.

  • JetByteTools::Socket::CStreamSocket::OnFinalRelease() is now nothrow().

  • JetByteTools::Socket::TAsyncSocket::TryRead(), etc. are all now nothrow().

  • Added JetByteTools::Socket::CStreamSocketConnectionCollection, JetByteTools::Socket::CStreamSocketBroadcastableConnectionCollection and JetByteTools::Socket::CStreamSocketNamedConnectionCollection as people seem to find it hard to write ‘chat server’ style servers where one connection needs to interact with others. There will eventually be example servers that use these.

  • It’s now possible to write a connection filter that filters OnClientClose(), OnConnectionReset() and OnClosed() events.

  • We now support two styles of “zero byte read”, sync and async.

  • Added JetByteTools::Socket::CSocketAllocator::LockUserDataSlots() as required by the change to JetByteTools::Win32::IProvideUserData.

  • JetByteTools::Socket::TAsycnSocket::TryRead() and JetByteTools::Socket::TAsycnSocket::TryWrite() are now nothrow().

Full details of the licensed version of the code are available here.

Full details of the free version of the code are available here.

Doxygen documentation for the latest release is available here.

If you’re an existing client and you’d like these changes let me know.