18 #ifndef INCLUDE_RCF_HTTPSESSIONFILTER_HPP 19 #define INCLUDE_RCF_HTTPSESSIONFILTER_HPP 21 #include <RCF/Filter.hpp> 22 #include <RCF/ByteBuffer.hpp> 28 class AsioNetworkSession;
31 typedef std::shared_ptr<RcfSession> RcfSessionPtr;
37 HttpSession(
const std::string & httpSessionId);
40 RcfSessionPtr mRcfSessionPtr;
42 bool mRequestInProgress;
43 std::uint32_t mLastTouchMs;
45 std::string mHttpSessionId;
46 std::uint32_t mHttpSessionIndex;
47 std::vector<FilterPtr> mTransportFilters;
49 ByteBuffer mCachedReadBuffer;
50 std::size_t mCachedReadBytesRequested;
53 typedef std::shared_ptr<HttpSession> HttpSessionPtr;
55 class HttpSessionFilter :
public Filter
59 HttpSessionFilter(AsioNetworkSession& networkSession);
62 virtual void resetState();
65 const ByteBuffer &byteBuffer,
66 std::size_t bytesRequested);
68 virtual void onReadCompleted(
const ByteBuffer &byteBuffer);
70 virtual void write(
const std::vector<ByteBuffer> &byteBuffers);
72 virtual void onWriteCompleted(std::size_t bytesTransferred);
74 virtual int getFilterId()
const;
76 ByteBuffer mReadBuffer;
78 std::vector<ByteBuffer> mWriteBuffers;
80 AsioNetworkSession & mNetworkSession;
81 HttpSessionPtr mHttpSessionPtr;
83 const std::vector<FilterPtr> mNoFilters;
90 #endif // ! INCLUDE_RCF_HTTPSESSIONFILTER_HPP Definition: AmiIoHandler.hpp:23