proxygen
SimpleServerPool Class Reference
Inheritance diagram for SimpleServerPool:
wangle::ServerPool< std::string >

Public Member Functions

Future< DefaultPipeline * > connect (BaseClientBootstrap< DefaultPipeline > *client, const std::string &) noexceptoverride
 
- Public Member Functions inherited from wangle::ServerPool< std::string >
virtual ~ServerPool ()
 

Detailed Description

Implementation of a broadcast ServerPool that establishes connection to an upstream server.

Definition at line 133 of file BroadcastProxy.cpp.

Member Function Documentation

Future<DefaultPipeline*> SimpleServerPool::connect ( BaseClientBootstrap< DefaultPipeline > *  client,
const std::string routingData 
)
inlineoverridevirtualnoexcept

Kick off an upstream connect request given the BaseClientBootstrap when a broadcast is not available locally.

Implements wangle::ServerPool< std::string >.

Definition at line 135 of file BroadcastProxy.cpp.

References wangle::BaseClientBootstrap< P >::connect(), folly::INFO, and folly::SocketAddress::setFromLocalPort().

137  {
138  SocketAddress address;
139  address.setFromLocalPort(FLAGS_upstream_port);
140 
141  LOG(INFO) << "Connecting to upstream server " << address
142  << " for subscribing to broadcast";
143  return client->connect(address);
144  }
void setFromLocalPort(uint16_t port)
virtual folly::Future< P * > connect(const folly::SocketAddress &address, std::chrono::milliseconds timeout=std::chrono::milliseconds(0))=0

The documentation for this class was generated from the following file: