add boolean and add missing protocol error close constant (#41)

This commit is contained in:
Kumamon38
2019-04-23 13:31:55 +02:00
committed by Benjamin Sergeant
parent 0caf875399
commit 28210ee31d
4 changed files with 27 additions and 9 deletions

View File

@@ -45,11 +45,11 @@ namespace ix
_pingTimeoutSecs(kDefaultPingTimeoutSecs)
{
_ws.setOnCloseCallback(
[this](uint16_t code, const std::string& reason, size_t wireSize)
[this](uint16_t code, const std::string& reason, size_t wireSize, bool remote)
{
_onMessageCallback(WebSocket_MessageType_Close, "", wireSize,
WebSocketErrorInfo(), WebSocketOpenInfo(),
WebSocketCloseInfo(code, reason));
WebSocketCloseInfo(code, reason, remote));
}
);
}