Add explicite WebSocket::sendBinary
New headers + WebSocketMessage class to hold message data, still not used across the board
This commit is contained in:
31
ixwebsocket/IXWebSocketMessage.h
Normal file
31
ixwebsocket/IXWebSocketMessage.h
Normal file
@ -0,0 +1,31 @@
|
||||
/*
|
||||
* IXWebSocketMessage.h
|
||||
* Author: Benjamin Sergeant
|
||||
* Copyright (c) 2017-2019 Machine Zone, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "IXWebSocketMessageType.h"
|
||||
#include "IXWebSocketErrorInfo.h"
|
||||
#include "IXWebSocketOpenInfo.h"
|
||||
#include "IXWebSocketCloseInfo.h"
|
||||
#include <string>
|
||||
#include <memory>
|
||||
#include <thread>
|
||||
|
||||
namespace ix
|
||||
{
|
||||
struct WebSocketMessage
|
||||
{
|
||||
WebSocketMessageType type;
|
||||
std::string str;
|
||||
size_t wireSize;
|
||||
WebSocketErrorInfo errorInfo;
|
||||
WebSocketOpenInfo openInfo;
|
||||
WebSocketCloseInfo closeInfo;
|
||||
bool binary;
|
||||
};
|
||||
|
||||
using WebSocketMessagePtr = std::shared_ptr<WebSocketMessage>;
|
||||
} // namespace ix
|
Reference in New Issue
Block a user