The latest release of the licensed version of the socket server framework is now available. This release includes the following changes.
The following changes were made to the libraries.
Admin Library - 5.2.4
/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.JETBYTE_, so there's JETBYTE_TODO, etc. This is to prevent name clashes with user code.JetByteTools::TReferenceCountedSmartPointer::Get() and JetByteTools::TReferenceCountedSmartPointer::GetRef().JetByteTools::TReferenceCountedSmartPointer::Release().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...JetByteTools::Win32::IWaitable::WaitWithMessageLoop(), this lets you pump messages whilst waiting on a handle.JetByteTools::Win32::IProvideUserData::LockUserDataSlots(), this allows you to force the provider to lock itself and allow no more slots to be added.JetByteTools::Win32::CLibraryLoader::GetOptionalProcAddress() which returns null if the function doesn't exist rather than throwing an exception.JetByteTools::Win32::CCallbackTimerQueueBase which is detailed here: http://www.lenholgate.com/archives/000803.html.JetByteTools::Win32::IListenForTimeChangeNotifications and JetByteTools::Win32::CTimeChangeNotificationMonitor to allow you to monitor WM_TIMECHANGE messages.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.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.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.JetByteTools::IO::CBufferAllocator::LockUserDataSlots() and JetByteTools::IO::CLockFreeBufferAllocator::LockUserDataSlots() as required by the change to JetByteTools::Win32::IProvideUserData.JetByteTools::IO::CBufferHandle are is protected, buffer handles should be allocated via an allocator.ConnectionErrorSource.h header file.JetByteTools::Socket::IStreamSocketCallback::OnError(), the one that had a socket and a message for arguments. We now deal with errors a little better...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.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().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.OnClientClose(), OnConnectionReset() and OnClosed() events.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 5.2 release is available here.
If you're an existing client and you'd like these changes let me know.