diff options
Diffstat (limited to 'lib/cpp/src/thrift/transport/THttpTransport.h')
-rw-r--r-- | lib/cpp/src/thrift/transport/THttpTransport.h | 30 |
1 files changed, 12 insertions, 18 deletions
diff --git a/lib/cpp/src/thrift/transport/THttpTransport.h b/lib/cpp/src/thrift/transport/THttpTransport.h index 8967c7446..a9f564c48 100644 --- a/lib/cpp/src/thrift/transport/THttpTransport.h +++ b/lib/cpp/src/thrift/transport/THttpTransport.h @@ -23,7 +23,9 @@ #include <thrift/transport/TBufferTransports.h> #include <thrift/transport/TVirtualTransport.h> -namespace apache { namespace thrift { namespace transport { +namespace apache { +namespace thrift { +namespace transport { /** * HTTP implementation of the thrift transport. This was irritating @@ -33,26 +35,18 @@ namespace apache { namespace thrift { namespace transport { * chunked transfer encoding, keepalive, etc. Tested against Apache. */ class THttpTransport : public TVirtualTransport<THttpTransport> { - public: +public: THttpTransport(boost::shared_ptr<TTransport> transport); virtual ~THttpTransport(); - void open() { - transport_->open(); - } + void open() { transport_->open(); } - bool isOpen() { - return transport_->isOpen(); - } + bool isOpen() { return transport_->isOpen(); } - bool peek() { - return transport_->peek(); - } + bool peek() { return transport_->peek(); } - void close() { - transport_->close(); - } + void close() { transport_->close(); } uint32_t read(uint8_t* buf, uint32_t len); @@ -64,8 +58,7 @@ class THttpTransport : public TVirtualTransport<THttpTransport> { virtual const std::string getOrigin(); - protected: - +protected: boost::shared_ptr<TTransport> transport_; std::string origin_; @@ -104,7 +97,8 @@ class THttpTransport : public TVirtualTransport<THttpTransport> { static const char* CRLF; static const int CRLF_LEN; }; - -}}} // apache::thrift::transport +} +} +} // apache::thrift::transport #endif // #ifndef _THRIFT_TRANSPORT_THTTPCLIENT_H_ |