Latest release of The Server Framework: 6.5.2
Version 6.5.2 of The Server Framework was released today.
This release adds some new functionality to the WebSockets Option pack and fixes some bugs in code that is only currently used by the WebSockets Option pack. If you have 6.5 or 6.5.1 and you are not using WebSockets then you probably don’t need this release.
This release includes the following, see the release notes, here, for full details of all changes.
- Bug fixes to JetByteTools::IO::CBufferChain and JetByteTools::IO::CSortedBufferChain.
- Added JetByteTools::IO::CLockableBufferProcessor::PutBackAndLock().
- Adjusted how
JETBYTE_DUMP_STREAM_SOCKET_READ_TO_DEBUG_LOG
, etc. work, you can now produce less debug data (faster) usingJETBYTE_TRACE_STREAM_SOCKET_READ_TO_DEBUG_LOG
, etc. - Removed duplication in WebSocket header processing.
- Breaking Change JetByteTools::WebSocket::IProtocolHandler::OnConnectionClosed() has been added and should be called when the underlying socket connection is closed. The example servers have been updated so please compare these to your own servers to see the changes required.
- Added overloads of JetByteTools::WebSocket::IWebSocket::WriteText() and JetByteTools::WebSocket::IWebSocket::TryWriteText() which take
BYTE *
of pre-formatted UTF8 data. - JetByteTools::WebSocket::TWebSocketBase now holds a reference to the underlying stream socket until the connection closes, this is because we can’t rely on their being a read pending to hold the stream socket open, even if the client thinks there is, as the websocket may have data buffered and so not issue a physical read.
- Adjusted JetByteTools::WebSocket::CAutoDetectProtocolHandler so that it doesn’t have to always issue a read when set to accept a connection. This allows for connections which may also carry non-websocket traffic.
- Adjusted how the HyBi protocol handler responds to errors. We now issue the ‘correct’ websocket layer close notification with the correct close code (we pass the latest Autobahn tests (0.4.3) which include tests for appropriate close codes) and notify client code via two new callbacks on JetByteTools::WebSocket::HyBi::IWebSocketServer, JetByteTools::WebSocket::HyBi::IWebSocketServer::OnError() and JetByteTools::WebSocket::HyBi::IWebSocketServer::OnClosed().
- Bug fix to JetByteTools::WebSocket::HyBi::CProtocolHandler which deals with a race condition during inbound data processing.
- Bug fix to JetByteTools::WebSocket::HyBi::CProtocolHandler and JetByteTools::WebSocket::Hixie76::CProtocolHandler which deals with close handling, we now wait for the other side’s close response correctly.
- Removed unnecessary size limitations in the
TCHAR *
based socket write methods.