Add constants for closing code and messages

This commit is contained in:
Benjamin Sergeant
2019-05-16 12:46:53 -07:00
parent 01f2eb6615
commit 309ed80446
6 changed files with 75 additions and 24 deletions

View File

@ -25,6 +25,7 @@
#include "IXCancellationRequest.h"
#include "IXWebSocketHandshake.h"
#include "IXProgressCallback.h"
#include "IXWebSocketCloseConstants.h"
namespace ix
{
@ -91,8 +92,8 @@ namespace ix
const OnProgressCallback& onProgressCallback);
WebSocketSendInfo sendPing(const std::string& message);
void close(uint16_t code = 1000,
const std::string& reason = "Normal closure",
void close(uint16_t code = WebSocketCloseConstants::kNormalClosureCode,
const std::string& reason = WebSocketCloseConstants::kNormalClosureMessage,
size_t closeWireSize = 0,
bool remote = false);