Latest release of The Server Framework: 6.5.4

Version 6.5.4 of The Server Framework was released today.

This release contains two important bug fixes and a selection of minor improvements. If you run your code on Vista/Windows Server 2003 or later and you don’t explicitly disable FILE_SKIP_COMPLETION_PORT_ON_SUCCESS in your Config.h then you should install this update.

This release includes the following, see the release notes, here, for full details of all changes.

  • Bug fix. If FILE_SKIP_COMPLETION_PORT_ON_SUCCESS was enabled but JetByteTools::Socket::CanEnableSkipCompletionPortOnSuccess() returned false then the the code that handled issuing read and write calls would fail if ERROR_SUCCESS was returned because it would assume that FILE_SKIP_COMPLETION_PORT_ON_SUCCESS was enabled and that it should handle the completion directly but a completion would have been posted to the IOCP and so the completion would get handled twice. We now correctly whether we have actually enabled FILE_SKIP_COMPLETION_PORT_ON_SUCCESS rather than just whether we want to enable it.

  • Change to JetByteTools::Socket::CConnectionMaintainingStreamSocketConnectionFilter so that we do not attempt to maintain a connection if the reconnect delay is 0.

  • Added the concept of being able to force a write request to go via the I/O pool even if marshalling is currently turned off.

  • Added JetByteTools::Socket::IManageStreamSocketConnectionFilters::TryRequestWrite()

  • Changed how JetByteTools::Socket::CFlowControlStreamSocketConnectionFilter issues write requests and how it deals with write failure due to socket closure. We now purge any queued data when we detect the socket has been closed, rather than continuing to try and send more.

  • Added JetByteTools::Socket::IDatagramSendSocket which is a common base class for JetByteTools::Socket::IDatagramSocket and JetByteTools::Socket::IDatagramServerSocket.

  • Added JetByteTools::Socket::IFilterableStreamSocket::CanIssueFilteredWrite() which is now called instead of JetByteTools::Socket::IStreamSocketEx::CanWrite() by JetByteTools::Socket::CFilteringStreamSocketConnectionManagerBase::TryRequestWrite(). This removes a race condition during the shutdown of the write side of a socket in situations where filtering is being used and the filter wishes to write to the socket after the application level code has requested that the write side of the socket be shut down. We always tracked the outstanding write count before actually issuing the shutdown and the filter could manage this to allow it to be able to send after a shutdown had been requested BUT the filtered send could still fail as the socket’s write shutdown flag would be set. This new function does not check the write shutdown flag and so allows the filter to write successfully.

  • Changed JetByteTools::IO::IAllocateBufferHandles::Flush() so that it returns a bool indicating if buffers were active when the flush was done. This brings it in line with JetByteTools::IO::IAllocateBuffers.

  • Changed the JetByteTools::IO::IAsyncIOStream::Write() methods so that they take an optional bool that enables you to force the write to go via the I/O pool even if I/O marshalling is turned off.

  • Changed JetByteTools::IO::CAsyncFileLog to monitor its own write thread to remove the chance that it might hang during destruction if the thread has terminated due to an exception.