add an option to easily disable per message deflate compression
This commit is contained in:
@ -109,7 +109,7 @@ namespace ix
|
||||
HttpRequestArgsPtr args,
|
||||
int redirects)
|
||||
{
|
||||
// We only have one socket connection, so we cannot
|
||||
// We only have one socket connection, so we cannot
|
||||
// make multiple requests concurrently.
|
||||
std::lock_guard<std::mutex> lock(_mutex);
|
||||
|
||||
|
@ -135,6 +135,13 @@ namespace ix
|
||||
_enablePong = false;
|
||||
}
|
||||
|
||||
void WebSocket::disablePerMessageDeflate()
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(_configMutex);
|
||||
WebSocketPerMessageDeflateOptions perMessageDeflateOptions(false);
|
||||
_perMessageDeflateOptions = perMessageDeflateOptions;
|
||||
}
|
||||
|
||||
void WebSocket::start()
|
||||
{
|
||||
if (_thread.joinable()) return; // we've already been started
|
||||
|
@ -95,6 +95,7 @@ namespace ix
|
||||
void setPingTimeout(int pingTimeoutSecs);
|
||||
void enablePong();
|
||||
void disablePong();
|
||||
void disablePerMessageDeflate();
|
||||
|
||||
// Run asynchronously, by calling start and stop.
|
||||
void start();
|
||||
|
Reference in New Issue
Block a user