This commit is contained in:
Benjamin Sergeant
2018-11-14 15:52:28 -08:00
parent 54da891f79
commit c64bc20bb5
9 changed files with 92 additions and 97 deletions

View File

@ -33,9 +33,9 @@ namespace ix
std::string errorStr;
WebSocketHttpHeaders headers;
WebSocketInitResult(bool s,
int status,
const std::string& e,
WebSocketInitResult(bool s = false,
int status = 0,
const std::string& e = std::string(),
WebSocketHttpHeaders h = WebSocketHttpHeaders())
{
success = s;
@ -43,15 +43,6 @@ namespace ix
errorStr = e;
headers = h;
}
// need to define a default
WebSocketInitResult()
{
success = false;
http_status = 0;
errorStr = "";
headers.clear();
}
};
class WebSocketTransport
@ -74,6 +65,7 @@ namespace ix
using OnMessageCallback = std::function<void(const std::string&,
size_t,
bool,
MessageKind)>;
using OnCloseCallback = std::function<void(uint16_t,
const std::string&,