aboutsummaryrefslogtreecommitdiff
path: root/zenhttp/websocketasio.cpp
diff options
context:
space:
mode:
authorPer Larsson <[email protected]>2022-03-08 15:45:09 +0100
committerPer Larsson <[email protected]>2022-03-08 15:45:09 +0100
commitf3a7c097352d5adf30b0bfc0a03cf88ae4744acb (patch)
tree707161c18534884f5745216b8b1b1855f4dac575 /zenhttp/websocketasio.cpp
parentAdded streaming version of GetCacheRecords. (diff)
downloadzen-f3a7c097352d5adf30b0bfc0a03cf88ae4744acb.tar.xz
zen-f3a7c097352d5adf30b0bfc0a03cf88ae4744acb.zip
Added streaming version of GetCacheChunks.
Diffstat (limited to 'zenhttp/websocketasio.cpp')
-rw-r--r--zenhttp/websocketasio.cpp41
1 files changed, 25 insertions, 16 deletions
diff --git a/zenhttp/websocketasio.cpp b/zenhttp/websocketasio.cpp
index 5a47d0ea9..9b64cc0a5 100644
--- a/zenhttp/websocketasio.cpp
+++ b/zenhttp/websocketasio.cpp
@@ -659,22 +659,22 @@ WsServer::Run()
m_Acceptor->set_option(asio::socket_base::send_buffer_size(SendBufferSize));
#if ZEN_PLATFORM_WINDOWS
- // On Windows, loopback connections can take advantage of a faster code path optionally with this flag.
- // This must be used by both the client and server side, and is only effective in the absence of
- // Windows Filtering Platform (WFP) callouts which can be installed by security software.
- // https://docs.microsoft.com/en-us/windows/win32/winsock/sio-loopback-fast-path
- SOCKET NativeSocket = m_Acceptor->native_handle();
- int LoopbackOptionValue = 1;
- DWORD OptionNumberOfBytesReturned = 0;
- WSAIoctl(NativeSocket,
- SIO_LOOPBACK_FAST_PATH,
- &LoopbackOptionValue,
- sizeof(LoopbackOptionValue),
- NULL,
- 0,
- &OptionNumberOfBytesReturned,
- 0,
- 0);
+ // On Windows, loopback connections can take advantage of a faster code path optionally with this flag.
+ // This must be used by both the client and server side, and is only effective in the absence of
+ // Windows Filtering Platform (WFP) callouts which can be installed by security software.
+ // https://docs.microsoft.com/en-us/windows/win32/winsock/sio-loopback-fast-path
+ SOCKET NativeSocket = m_Acceptor->native_handle();
+ int LoopbackOptionValue = 1;
+ DWORD OptionNumberOfBytesReturned = 0;
+ WSAIoctl(NativeSocket,
+ SIO_LOOPBACK_FAST_PATH,
+ &LoopbackOptionValue,
+ sizeof(LoopbackOptionValue),
+ NULL,
+ 0,
+ &OptionNumberOfBytesReturned,
+ 0,
+ 0);
#endif
asio::error_code Ec;
@@ -1590,6 +1590,15 @@ WebSocketService::SendStreamResponse(WebSocketId SocketId, uint32_t CorrelationI
}
void
+WebSocketService::SendStreamResponse(WebSocketId SocketId, uint32_t CorrelationId, CbObject&& StreamResponse)
+{
+ CbPackage Response;
+ Response.SetObject(std::move(StreamResponse));
+
+ SendStreamResponse(SocketId, CorrelationId, std::move(Response));
+}
+
+void
WebSocketService::SendStreamCompleteResponse(WebSocketId SocketId, uint32_t CorrelationId)
{
WebSocketMessage Message;