Latest release of licensed socket server code: 5.2.1

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

  • All code now builds with VC6, VS2002, VS2003, VS2005 and VS2008. The VS2005 and VS2008 builds support x86 and x64.

  • This is the first release built using continuous integration and there have been some project file fixes to fix incorrect output directories, etc so that x64 and x86 builds can be done in complete isolation.

The following changes were made to the libraries.

Admin Library - 5.2.1

  • Added an Admin.cpp file which displays details of the settings from Admin.h during a build.

  • Adjusted the SecureCRT.h header which is used to provide the “secure” string functions on compilers prior to VS2005.

Win32 Tools Library - 5.2.1

  • We no longer output ANY debug logging directly from library code. It’s your choice to log if you want to.

  • Added JetByteTools::Win32::IMonitorThreadPool::OnThreadPoolError() which is called when an error occurs in a thread pool

  • Added JetByteTools::Win32::IIOCPWorkerThreadCallback::OnProcessException() and JetByteTools::Win32::IIOCPWorkerThreadCallback::OnThreadTerminationException() which are called when worker threads have problems.

  • Added JetByteTools::Win32::CThreadedCallbackTimerQueue::OnThreadTerminationException() which is called when the worker thread dies unexpectedly.

  • Fixed JetByteTools::Win32::CThreadPool where there was a bug in the code used to forcibly terminate threads if they didn’t shutdown cleanly in time during a shutdown of the pool. If the pool had expanded and then contracted, or if any threads had terminated due to exceptions then there would be invalid entries in the list of threads that the pool would attempt to terminate and this could cause access violations.

  • Fixed JetByteTools::Win32::GetLastErrorMessage() it no longer reports “invalid parameter” as the error message for any messages which have insertion strings…

  • JetByteTools::Win32::IsGoodReadPtr() is now cross process

  • Added JetByteTools::Win32::SetCurrentDirectory()

  • Added JetByteTools::Win32::StripFileNameFromPathName() which does the opposite of JetByteTools::Win32::GetFileNameFromPathName(); that is, the new function returns the path without the element after the last backslash.

  • Fixed JetByteTools::Win32::CThreadNameInfo to use DWORD_PTRs rather than DWORDs.

  • Added JetByteTools::Win32::CThread::IsThisThread() which returns true if the calling thread is the thread represented by the thread object.

  • Added JetByteTools::Win32::IConfiguration::GetShortValue().

  • Fixed JetByteTools::Win32::CThreadPool where an exception thrown from Process() would prevent OnThreadPoolProcessingStopped() being called which would screw up the active thread count and lead to thread starvation.

  • Added JetByteTools::Win32::IsWow64Process() which returns true if the process is an x86 process that is running under WOW64 on an x64 system.

  • Added JetByteTools::Win32::Is64bitProcess() which returns true if the process is an x64 process.

  • Added JetByteTools::Win32::Is32bitProcess() which returns true if the process is an x86 process.

  • Added JetByteTools::Win32::IConfiguration::GetOptionalConfiguration() and JetByteTools::Win32::IConfiguration::GetOptionalConfigurations().

  • Added JetByteTools::Win32::CEvent::CreationFlags and adjusted the constructors of all three event classes so that you can specify if construction should fail if a named event object already exists, or doesn’t already exist. The default behaviour is to not care, which is the same as previous versions of the library.

  • A few small lint related changes, as we’re now running PC-Lint on the code again.

  • New constructors for JetByteTools::Win32::CEvent, JetByteTools::Win32::CAutoResetEvent and JetByteTools::Win32::CManualResetEvent to enable you to specify that creation of a named event should fail if an event of that name already exists, or if an event of that name does NOT already exist.

I/O Tools Library - 5.2.1

  • Bug fix in JetByteTools::IO::CAsyncFileWriter to release the buffer that was used during a write before we signal that the write is complete, this prevents a resource leak or crash when the destructor is waiting for the final write to complete before cleaning up.

Socket Tools Library - 5.2.1

  • A hacky fix in IServerControl.h to work around the InitiateShutdown macros that have been moved in a recent version of the Platform SDK. See the comment in the header for details.

  • In NameInfo.cpp, if _WIN32_WINNT is less than 0x0502 then use getnameinfo() as GetNameInfoW() isn’t available on this platform.

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

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

No new documentation for this release.

Doxygen documentation for the latest release is available here.

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