2018-11-10 03:23:49 +01:00
|
|
|
/*
|
|
|
|
* IXWebSocketHttpHeaders.h
|
|
|
|
* Author: Benjamin Sergeant
|
|
|
|
* Copyright (c) 2018 Machine Zone, Inc. All rights reserved.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2019-02-15 05:11:42 +01:00
|
|
|
#include "IXCancellationRequest.h"
|
|
|
|
|
2018-11-10 03:23:49 +01:00
|
|
|
#include <string>
|
|
|
|
#include <unordered_map>
|
2019-02-15 05:11:42 +01:00
|
|
|
#include <memory>
|
|
|
|
#include <algorithm>
|
2018-11-10 03:23:49 +01:00
|
|
|
|
|
|
|
namespace ix
|
|
|
|
{
|
2019-02-15 05:11:42 +01:00
|
|
|
class Socket;
|
|
|
|
|
2018-11-10 03:23:49 +01:00
|
|
|
using WebSocketHttpHeaders = std::unordered_map<std::string, std::string>;
|
2019-02-15 05:11:42 +01:00
|
|
|
|
|
|
|
std::pair<bool, WebSocketHttpHeaders> parseHttpHeaders(
|
|
|
|
std::shared_ptr<Socket> socket,
|
|
|
|
const CancellationRequest& isCancellationRequested);
|
2018-11-10 03:23:49 +01:00
|
|
|
}
|