ws connect has a new option to send HTTP headers + use WebSocketHttpHeaders instead of unordered_map<string, string>
This commit is contained in:
@ -21,7 +21,6 @@
|
||||
#include <mutex>
|
||||
#include <string>
|
||||
#include <thread>
|
||||
#include <unordered_map>
|
||||
|
||||
namespace ix
|
||||
{
|
||||
@ -45,8 +44,9 @@ namespace ix
|
||||
~WebSocket();
|
||||
|
||||
void setUrl(const std::string& url);
|
||||
void setExtraHeaders(const std::unordered_map<std::string, std::string>&
|
||||
headers); // send extra headers in client handshake request
|
||||
|
||||
// send extra headers in client handshake request
|
||||
void setExtraHeaders(const WebSocketHttpHeaders& headers);
|
||||
void setPerMessageDeflateOptions(
|
||||
const WebSocketPerMessageDeflateOptions& perMessageDeflateOptions);
|
||||
void setHeartBeatPeriod(int heartBeatPeriodSecs);
|
||||
@ -114,7 +114,7 @@ namespace ix
|
||||
WebSocketTransport _ws;
|
||||
|
||||
std::string _url;
|
||||
std::unordered_map<std::string, std::string> _extraHeaders;
|
||||
WebSocketHttpHeaders _extraHeaders;
|
||||
|
||||
WebSocketPerMessageDeflateOptions _perMessageDeflateOptions;
|
||||
mutable std::mutex _configMutex; // protect all config variables access
|
||||
|
Reference in New Issue
Block a user