20 #ifndef Hypertable_ThriftBroker_Client_h
21 #define Hypertable_ThriftBroker_Client_h
24 #include <protocol/TBinaryProtocol.h>
25 #include <transport/TSocket.h>
26 #include <transport/TTransportUtils.h>
28 #include "gen-cpp/HqlService.h"
46 : socket(new TSocket(host, port)),
47 transport(new TFramedTransport(socket)),
48 protocol(new TBinaryProtocol(transport)) {
50 socket->setConnTimeout(timeout_ms);
51 socket->setSendTimeout(timeout_ms);
52 socket->setRecvTimeout(timeout_ms);
61 Client(
const std::string &host,
int port,
int timeout_ms = 300000,
63 :
ClientHelper(host, port, timeout_ms), HqlServiceClient(protocol),
88 #endif // Hypertable_ThriftBroker_Client_h
Client(const std::string &host, int port, int timeout_ms=300000, bool open=true)
ClientHelper(const std::string &host, int port, int timeout_ms)
boost::shared_ptr< TTransport > transport
boost::shared_ptr< TSocket > socket
boost::shared_ptr< TProtocol > protocol
std::shared_ptr< Client > ClientPtr
Smart pointer to client.
A client for the ThriftBroker.