proxygen
|
Public Member Functions | |
Server () | |
void | stop (bool abortive) |
void | join () |
int | port () const |
int | closeClients (bool abortive) |
Private Types | |
enum | StopMode { NO_STOP, ORDERLY, ABORTIVE } |
Private Attributes | |
int | acceptSocket_ |
int | port_ |
std::atomic< StopMode > | stop_ |
std::thread | serverThread_ |
std::vector< int > | fds_ |
Definition at line 36 of file ShutdownSocketSetTest.cpp.
|
private |
folly::test::Server::Server | ( | ) |
Definition at line 56 of file ShutdownSocketSetTest.cpp.
References ABORTIVE, folly::netops::accept(), acceptSocket_, folly::ShutdownSocketSet::add(), addr, folly::netops::bind(), folly::ShutdownSocketSet::close(), closeClients(), fds_, folly::netops::getsockname(), folly::netops::listen(), NO_STOP, port_, serverThread_, folly::netops::socket(), and stop_.
int folly::test::Server::closeClients | ( | bool | abortive | ) |
Definition at line 105 of file ShutdownSocketSetTest.cpp.
References folly::ShutdownSocketSet::close(), fds_, and folly::netops::setsockopt().
Referenced by port(), folly::test::runCloseTest(), folly::test::runKillTest(), and Server().
void folly::test::Server::join | ( | ) |
Definition at line 123 of file ShutdownSocketSetTest.cpp.
References serverThread_.
Referenced by folly::test::runCloseTest(), and folly::test::runKillTest().
|
inline |
Definition at line 42 of file ShutdownSocketSetTest.cpp.
References closeClients(), and port_.
Referenced by folly::test::runCloseTest(), and folly::test::runKillTest().
void folly::test::Server::stop | ( | bool | abortive | ) |
Definition at line 118 of file ShutdownSocketSetTest.cpp.
References ABORTIVE, acceptSocket_, ORDERLY, folly::shutdown(), and stop_.
Referenced by folly::test::runCloseTest().
|
private |
Definition at line 48 of file ShutdownSocketSetTest.cpp.
|
private |
Definition at line 53 of file ShutdownSocketSetTest.cpp.
Referenced by closeClients(), and Server().
|
private |
Definition at line 49 of file ShutdownSocketSetTest.cpp.
|
private |
Definition at line 52 of file ShutdownSocketSetTest.cpp.
|
private |
Definition at line 51 of file ShutdownSocketSetTest.cpp.