close method change and fix code (#28)

* close method change and fix code

* missing mutex
This commit is contained in:
Kumamon38
2019-04-16 17:58:34 +02:00
committed by Benjamin Sergeant
parent fbb7c012a3
commit 935e6791a3
2 changed files with 20 additions and 18 deletions

View File

@ -81,7 +81,7 @@ namespace ix
WebSocketSendInfo sendText(const std::string& message,
const OnProgressCallback& onProgressCallback);
WebSocketSendInfo sendPing(const std::string& message);
void close();
void close(uint16_t code = 1000, const std::string& reason = "Normal closure");
ReadyStateValues getReadyState() const;
void setReadyState(ReadyStateValues readyStateValue);
void setOnCloseCallback(const OnCloseCallback& onCloseCallback);
@ -164,6 +164,8 @@ namespace ix
// No data was send through the socket for longer than the heartbeat period
bool heartBeatPeriodExceeded();
void close(uint16_t code, const std::string& reason, size_t closeWireSize);
void sendOnSocket();
WebSocketSendInfo sendData(wsheader_type::opcode_type type,
const std::string& message,