WebSocket callback only take one object, a const ix::WebSocketMessagePtr& msg

This commit is contained in:
Benjamin Sergeant
2019-06-09 11:33:17 -07:00
parent 2e5f24f1f8
commit be93f7480a
24 changed files with 311 additions and 416 deletions

View File

@ -6,12 +6,12 @@
#pragma once
#include "IXWebSocketMessageType.h"
#include "IXWebSocketErrorInfo.h"
#include "IXWebSocketOpenInfo.h"
#include "IXWebSocketCloseInfo.h"
#include <string>
#include "IXWebSocketErrorInfo.h"
#include "IXWebSocketMessageType.h"
#include "IXWebSocketOpenInfo.h"
#include <memory>
#include <string>
#include <thread>
namespace ix
@ -25,6 +25,22 @@ namespace ix
WebSocketOpenInfo openInfo;
WebSocketCloseInfo closeInfo;
bool binary;
WebSocketMessage(WebSocketMessageType t,
const std::string& s,
size_t w,
WebSocketErrorInfo e,
WebSocketOpenInfo o,
WebSocketCloseInfo c)
: type(t)
, str(std::move(s))
, wireSize(w)
, errorInfo(e)
, openInfo(o)
, closeInfo(c)
{
;
}
};
using WebSocketMessagePtr = std::shared_ptr<WebSocketMessage>;