proxygen
|
#include <Utils.h>
Classes | |
class | CallbackFactory |
Public Member Functions | |
FizzTestServer (folly::EventBase &evb, CallbackFactory *factory, int port=0) | |
void | setFizzContext (std::shared_ptr< FizzServerContext > ctx) |
void | acceptError (const std::exception &ex) noexceptoverride |
void | connectionAccepted (int fd, const folly::SocketAddress &) noexceptoverride |
void | setResumption (bool enable) |
void | setCertificate (std::unique_ptr< SelfCert > cert) |
void | enableClientAuthWithChain (std::string path, ClientAuthMode mode=ClientAuthMode::Optional) |
void | disableClientAuth () |
void | setAcceptEarlyData (bool enable) |
void | stopAccepting () |
folly::SocketAddress | getAddress () |
std::shared_ptr< FizzServerContext > | getFizzContext () |
![]() | |
virtual | ~AcceptCallback ()=default |
virtual void | acceptStarted () noexcept |
virtual void | acceptStopped () noexcept |
Private Attributes | |
folly::AsyncServerSocket::UniquePtr | socket_ |
std::shared_ptr< FizzServerContext > | ctx_ |
CallbackFactory * | factory_ |
folly::EventBase & | evb_ |
|
inline |
Definition at line 30 of file Utils.h.
References fizz::test::createCert(), ctx_, evb_, folly::gen::move, and socket_.
|
inlineoverridevirtualnoexcept |
acceptError() is called if an error occurs while accepting.
The AcceptCallback will remain installed even after an accept error, as the errors are typically somewhat transient, such as being out of file descriptors. The server socket must be explicitly stopped if you wish to stop accepting after an error.
ex | An exception representing the error. |
Implements folly::AsyncServerSocket::AcceptCallback.
|
inlineoverridevirtualnoexcept |
connectionAccepted() is called whenever a new client connection is received.
The AcceptCallback will remain installed after connectionAccepted() returns.
fd | The newly accepted client socket. The AcceptCallback assumes ownership of this socket, and is responsible for closing it when done. The newly accepted file descriptor will have already been put into non-blocking mode. |
clientAddr | A reference to a SocketAddress struct containing the client's address. This struct is only guaranteed to remain valid until connectionAccepted() returns. |
Implements folly::AsyncServerSocket::AcceptCallback.
Definition at line 58 of file Utils.h.
References ctx_, evb_, factory_, and fizz::server::test::FizzTestServer::CallbackFactory::getCallback().
|
inline |
Definition at line 116 of file Utils.h.
References ctx_, and fizz::server::None.
|
inline |
Definition at line 88 of file Utils.h.
References ctx_, mode, folly::gen::move, folly::ssl::OpenSSLCertUtils::readCertsFromBuffer(), folly::readFile(), fizz::Server, and string.
|
inline |
Definition at line 136 of file Utils.h.
|
inline |
Definition at line 142 of file Utils.h.
References ctx_.
|
inline |
Definition at line 121 of file Utils.h.
References ctx_.
|
inline |
Definition at line 82 of file Utils.h.
References ctx_, and folly::gen::move.
|
inline |
Definition at line 50 of file Utils.h.
References ctx_.
|
inline |
Definition at line 68 of file Utils.h.
References ctx_, and folly::range().
|
inline |
Definition at line 132 of file Utils.h.
References socket_.
|
private |
Definition at line 148 of file Utils.h.
Referenced by connectionAccepted(), disableClientAuth(), enableClientAuthWithChain(), FizzTestServer(), getFizzContext(), setAcceptEarlyData(), setCertificate(), setFizzContext(), and setResumption().
|
private |
Definition at line 150 of file Utils.h.
Referenced by connectionAccepted(), and FizzTestServer().
|
private |
Definition at line 149 of file Utils.h.
Referenced by connectionAccepted().
|
private |
Definition at line 147 of file Utils.h.
Referenced by FizzTestServer(), getAddress(), and stopAccepting().