Allow customizing the websocket handshake timeout (#264)

This commit is contained in:
Duncan Ogilvie 2021-03-08 04:23:43 +01:00 committed by GitHub
parent e7f7e470e2
commit d739662a7c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View File

@ -56,6 +56,11 @@ namespace ix
_url = url;
}
void WebSocket::setHandshakeTimeout(int handshakeTimeoutSecs)
{
_handshakeTimeoutSecs = handshakeTimeoutSecs;
}
void WebSocket::setExtraHeaders(const WebSocketHttpHeaders& headers)
{
std::lock_guard<std::mutex> lock(_configMutex);

View File

@ -48,6 +48,7 @@ namespace ix
void setUrl(const std::string& url);
// send extra headers in client handshake request
void setHandshakeTimeout(int handshakeTimeoutSecs);
void setExtraHeaders(const WebSocketHttpHeaders& headers);
void setPerMessageDeflateOptions(
const WebSocketPerMessageDeflateOptions& perMessageDeflateOptions);