Unverified Commit 616ead2c authored by Igor [hyperxor]'s avatar Igor [hyperxor] Committed by GitHub

Hide access to request parser object from clients (#846)

parent fdcf5274
...@@ -30,6 +30,7 @@ class Transport; ...@@ -30,6 +30,7 @@ class Transport;
class Peer { class Peer {
public: public:
friend class Transport; friend class Transport;
friend class Http::Handler;
~Peer(); ~Peer();
...@@ -42,9 +43,6 @@ public: ...@@ -42,9 +43,6 @@ public:
void *ssl() const; void *ssl() const;
void setParser(std::shared_ptr<Http::RequestParser> parser);
std::shared_ptr<Http::RequestParser> getParser() const;
Async::Promise<ssize_t> send(const RawBuffer &buffer, int flags = 0); Async::Promise<ssize_t> send(const RawBuffer &buffer, int flags = 0);
size_t getID() const; size_t getID() const;
...@@ -52,6 +50,9 @@ protected: ...@@ -52,6 +50,9 @@ protected:
Peer(Fd fd, const Address &addr, void *ssl); Peer(Fd fd, const Address &addr, void *ssl);
private: private:
void setParser(std::shared_ptr<Http::RequestParser> parser);
std::shared_ptr<Http::RequestParser> getParser() const;
void associateTransport(Transport *transport); void associateTransport(Transport *transport);
Transport *transport() const; Transport *transport() const;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment