proxygen
EchoServer.cpp File Reference

Go to the source code of this file.

Classes

class  EchoHandler
 
class  EchoPipelineFactory
 

Typedefs

typedef Pipeline< IOBufQueue &, std::stringEchoPipeline
 

Functions

 DEFINE_int32 (port, 8080,"echo server port")
 
int main (int argc, char **argv)
 

Typedef Documentation

Definition at line 30 of file EchoServer.cpp.

Function Documentation

DEFINE_int32 ( port  ,
8080  ,
"echo server port"   
)
int main ( int  argc,
char **  argv 
)

Definition at line 57 of file EchoServer.cpp.

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

57  {
58  folly::Init init(&argc, &argv);
59 
61  server.childPipeline(std::make_shared<EchoPipelineFactory>());
62  server.bind(FLAGS_port);
63  server.waitForStop();
64 
65  return 0;
66 }
void bind(folly::AsyncServerSocket::UniquePtr s)
void init()
ServerBootstrap * childPipeline(std::shared_ptr< PipelineFactory< Pipeline >> factory)
char ** argv