proxygen
accept_steering_server.cpp File Reference

Go to the source code of this file.

Classes

class  NaiveRoutingDataHandler
 
class  NaiveRoutingDataHandlerFactory
 
class  ThreadPrintingHandler
 
class  ServerPipelineFactory
 

Functions

 DEFINE_int32 (port, 23,"test server port")
 
int main (int argc, char **argv)
 

Function Documentation

DEFINE_int32 ( port  ,
23  ,
"test server port"   
)
int main ( int  argc,
char **  argv 
)

Definition at line 104 of file accept_steering_server.cpp.

References wangle::ServerBootstrap< Pipeline >::bind(), folly::init(), and wangle::ServerBootstrap< Pipeline >::pipeline().

104  {
105  folly::Init init(&argc, &argv);
106 
107  auto routingHandlerFactory =
108  std::make_shared<NaiveRoutingDataHandlerFactory>();
109  auto childPipelineFactory = std::make_shared<ServerPipelineFactory>();
110 
112  server.pipeline(
114  &server, routingHandlerFactory, childPipelineFactory));
115  server.bind(FLAGS_port);
116  server.waitForStop();
117 
118  return 0;
119 }
void bind(folly::AsyncServerSocket::UniquePtr s)
void init()
char ** argv
ServerBootstrap * pipeline(std::shared_ptr< AcceptPipelineFactory > factory)