proxygen
Proxy.cpp File Reference

Go to the source code of this file.

Classes

class  ProxyBackendHandler
 
class  ProxyBackendPipelineFactory
 
class  ProxyFrontendHandler
 
class  ProxyFrontendPipelineFactory
 

Functions

 DEFINE_int32 (port, 1080,"proxy server port")
 
 DEFINE_string (remote_host,"127.0.0.1","remote host")
 
 DEFINE_int32 (remote_port, 23,"remote port")
 
int main (int argc, char **argv)
 

Function Documentation

DEFINE_int32 ( port  ,
1080  ,
"proxy server port"   
)
DEFINE_int32 ( remote_port  ,
23  ,
"remote port"   
)
DEFINE_string ( remote_host  ,
"127.0.0.1"  ,
"remote host"   
)
int main ( int  argc,
char **  argv 
)

Definition at line 155 of file Proxy.cpp.

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

155  {
156  folly::Init init(&argc, &argv);
157 
159  server.childPipeline(std::make_shared<ProxyFrontendPipelineFactory>(
160  SocketAddress(FLAGS_remote_host, FLAGS_remote_port)));
161  server.bind(FLAGS_port);
162  server.waitForStop();
163 
164  return 0;
165 }
void bind(folly::AsyncServerSocket::UniquePtr s)
void init()
ServerBootstrap * childPipeline(std::shared_ptr< PipelineFactory< Pipeline >> factory)
char ** argv