19 #ifndef INCLUDE_RCF_HTTPSESSIONFILTER_HPP
20 #define INCLUDE_RCF_HTTPSESSIONFILTER_HPP
22 #include <RCF/Filter.hpp>
23 #include <RCF/ByteBuffer.hpp>
27 class AsioNetworkSession;
30 typedef boost::shared_ptr<RcfSession> RcfSessionPtr;
36 HttpSession(
const std::string & httpSessionId);
39 RcfSessionPtr mRcfSessionPtr;
41 bool mRequestInProgress;
42 boost::uint32_t mLastTouchMs;
44 std::string mHttpSessionId;
45 boost::uint32_t mHttpSessionIndex;
46 std::vector<FilterPtr> mTransportFilters;
48 ByteBuffer mCachedReadBuffer;
49 std::size_t mCachedReadBytesRequested;
54 typedef boost::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;
93 #endif // ! INCLUDE_RCF_HTTPSESSIONFILTER_HPP