diff options
author | Mauro Sardara <msardara+fdio@cisco.com> | 2018-02-16 17:22:53 +0100 |
---|---|---|
committer | Mauro Sardara <msardara+fdio@cisco.com> | 2018-02-16 17:22:53 +0100 |
commit | 953f18b834951680c738e9ce367b5a3eff91ccda (patch) | |
tree | 52bc181e53b9c76db1e14e693f473ca8cfca7250 /icnet/http/icnet_http_server_acceptor.h | |
parent | c5e952d1cadbdf85c976e88ba97ea8bee7e422ab (diff) |
Improvements for HTTP messages processing
Change-Id: Iefcbfa1820bd47fd52475780c68c363a2baa2568
Signed-off-by: Mauro Sardara <msardara+fdio@cisco.com>
Diffstat (limited to 'icnet/http/icnet_http_server_acceptor.h')
-rw-r--r-- | icnet/http/icnet_http_server_acceptor.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/icnet/http/icnet_http_server_acceptor.h b/icnet/http/icnet_http_server_acceptor.h index 2d0b7f25..f5af47e8 100644 --- a/icnet/http/icnet_http_server_acceptor.h +++ b/icnet/http/icnet_http_server_acceptor.h @@ -31,7 +31,7 @@ namespace http { //typedef std::vector<uint8_t> HTTPResponse; typedef std::vector<uint8_t> HttpRequest; -typedef std::function<void(std::shared_ptr<HTTPServerPublisher> &, const uint8_t *, std::size_t)> OnHttpRequest; +typedef std::function<void(std::shared_ptr<HTTPServerPublisher> &, const uint8_t *, std::size_t, int request_id)> OnHttpRequest; class HTTPServerAcceptor { public: @@ -42,11 +42,7 @@ class HTTPServerAcceptor { HttpRequest &&request(); -// void asyncSendResponse(); - -// HTTPClientConnection& get(std::string &url, HTTPHeaders headers = {}, HTTPPayload payload = {}); -// -// HTTPResponse&& response(); + std::map<int, std::shared_ptr<HTTPServerPublisher>>& getPublishers(); private: @@ -55,6 +51,8 @@ class HTTPServerAcceptor { OnHttpRequest callback_; HttpRequest request_; std::shared_ptr<transport::ProducerSocket> acceptor_producer_; + + std::map<int, std::shared_ptr<HTTPServerPublisher>> publishers_; }; } // end namespace http |