Host HTTP and WS on the same port (#414)
* Quick hack to host HTTP and WS on the same port #373 * Quick hack to host HTTP and WS on the same port #373 - simplify code * ran clang-format Co-authored-by: En Shih <seanstone5923@gmail.com> Co-authored-by: The Artful Bodger <TheArtfulBodger@users.noreply.github.com>
This commit is contained in:
@ -7,6 +7,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "IXCancellationRequest.h"
|
||||
#include "IXHttp.h"
|
||||
#include "IXSocket.h"
|
||||
#include "IXWebSocketHttpHeaders.h"
|
||||
#include "IXWebSocketInitResult.h"
|
||||
@ -35,7 +36,9 @@ namespace ix
|
||||
int port,
|
||||
int timeoutSecs);
|
||||
|
||||
WebSocketInitResult serverHandshake(int timeoutSecs, bool enablePerMessageDeflate);
|
||||
WebSocketInitResult serverHandshake(int timeoutSecs,
|
||||
bool enablePerMessageDeflate,
|
||||
HttpRequestPtr request = nullptr);
|
||||
|
||||
private:
|
||||
std::string genRandomString(const int len);
|
||||
|
Reference in New Issue
Block a user