19 #ifndef INCLUDE_RCF_HTTPSESSIONFILTER_HPP 20 #define INCLUDE_RCF_HTTPSESSIONFILTER_HPP 22 #include <RCF/Filter.hpp> 23 #include <RCF/ByteBuffer.hpp> 29 class AsioNetworkSession;
32 typedef std::shared_ptr<RcfSession> RcfSessionPtr;
38 HttpSession(
const std::string & httpSessionId);
41 RcfSessionPtr mRcfSessionPtr;
43 bool mRequestInProgress;
44 std::uint32_t mLastTouchMs;
46 std::string mHttpSessionId;
47 std::uint32_t mHttpSessionIndex;
48 std::vector<FilterPtr> mTransportFilters;
50 ByteBuffer mCachedReadBuffer;
51 std::size_t mCachedReadBytesRequested;
54 typedef std::shared_ptr<HttpSession> HttpSessionPtr;
56 class HttpSessionFilter :
public Filter
60 HttpSessionFilter(AsioNetworkSession& networkSession);
63 virtual void resetState();
66 const ByteBuffer &byteBuffer,
67 std::size_t bytesRequested);
69 virtual void onReadCompleted(
const ByteBuffer &byteBuffer);
71 virtual void write(
const std::vector<ByteBuffer> &byteBuffers);
73 virtual void onWriteCompleted(std::size_t bytesTransferred);
75 virtual int getFilterId()
const;
77 ByteBuffer mReadBuffer;
79 std::vector<ByteBuffer> mWriteBuffers;
81 AsioNetworkSession & mNetworkSession;
82 HttpSessionPtr mHttpSessionPtr;
84 const std::vector<FilterPtr> mNoFilters;
91 #endif // ! INCLUDE_RCF_HTTPSESSIONFILTER_HPP Definition: AmiIoHandler.hpp:24