Add client handshake extra headers (#105)
Even though 6455 defines all the necessary headers needed for client/server handshake, in practice most of the cases websocket servers expect few more headers. Therefore adding this functionality.
This commit is contained in:
committed by
Benjamin Sergeant
parent
ff75846d2d
commit
93debc00dc
@ -16,6 +16,7 @@
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <tuple>
|
||||
#include <unordered_map>
|
||||
|
||||
namespace ix
|
||||
{
|
||||
@ -50,11 +51,13 @@ namespace ix
|
||||
WebSocketPerMessageDeflateOptions& perMessageDeflateOptions,
|
||||
std::atomic<bool>& enablePerMessageDeflate);
|
||||
|
||||
WebSocketInitResult clientHandshake(const std::string& url,
|
||||
const std::string& host,
|
||||
const std::string& path,
|
||||
int port,
|
||||
int timeoutSecs);
|
||||
WebSocketInitResult clientHandshake(
|
||||
const std::string& url,
|
||||
const std::unordered_map<std::string, std::string>& extraHeaders,
|
||||
const std::string& host,
|
||||
const std::string& path,
|
||||
int port,
|
||||
int timeoutSecs);
|
||||
|
||||
WebSocketInitResult serverHandshake(int fd, int timeoutSecs);
|
||||
|
||||
|
Reference in New Issue
Block a user