19 #ifndef INCLUDE_RCF_HTTPCONNECTFILTER_HPP
20 #define INCLUDE_RCF_HTTPCONNECTFILTER_HPP
23 #include <boost/shared_ptr.hpp>
25 #include <RCF/Filter.hpp>
26 #include <RCF/ByteBuffer.hpp>
27 #include <RCF/HttpFrameFilter.hpp>
33 class HttpConnectFilter :
public Filter
38 HttpConnectFilter(
const std::string serverAddr,
int serverPort);
43 const ByteBuffer &byteBuffer,
44 std::size_t bytesRequested);
46 void write(
const std::vector<ByteBuffer> &byteBuffers);
48 void onReadCompleted(
const ByteBuffer &byteBuffer);
50 void onWriteCompleted(std::size_t bytesTransferred);
52 int getFilterId()
const;
65 void sendProxyRequest();
66 void tryNextAuthType();
68 void doNtlmHandshake();
69 void doProxyAuthRetry();
71 std::string mServerAddr;
76 std::vector<ByteBuffer> mOrigWriteBuffers;
78 std::string mHttpProxyRequest;
79 std::string mHttpProxyResponse;
81 HttpMessage mHttpMessage;
83 std::size_t mWritePos;
86 std::vector<char> mReadVector;
89 std::vector< std::pair<AuthType, std::string> >
92 std::size_t mCurrentAuthType;
94 std::auto_ptr<NtlmWrapper> mNtlmWrapper;
99 #endif // ! INCLUDE_RCF_HTTPCONNECTFILTER_HPP