Add access to HTTP request headers in websocket_connection

This commit is contained in:
elmato 2017-01-16 19:55:17 +00:00
parent c1361d8cf9
commit aed35f5b06
2 changed files with 7 additions and 0 deletions

View file

@ -29,6 +29,8 @@ namespace fc { namespace http {
void set_session_data( fc::any d ){ _session_data = std::move(d); }
fc::any& get_session_data() { return _session_data; }
virtual std::string get_request_header(const std::string& key) = 0;
fc::signal<void()> closed;
private:
fc::any _session_data;

View file

@ -168,6 +168,11 @@ namespace fc { namespace http {
_ws_connection->close(code,reason);
}
virtual std::string get_request_header(const std::string& key)override
{
return _ws_connection->get_request_header(key);
}
T _ws_connection;
};