68 const std::shared_ptr<HTTPCodecFactory>& codecFactory) {
71 std::vector<RequestHandlerFactory*> handlerFactories;
73 handlerFactories.push_back(
f.get());
75 std::reverse(handlerFactories.begin(), handlerFactories.end());
77 return std::unique_ptr<HTTPServerAcceptor>(
83 const std::shared_ptr<HTTPCodecFactory>& codecFactory,
84 std::vector<RequestHandlerFactory*> handlerFactories,
103 txn.getPeerAddress(clientAddr);
104 txn.getLocalAddress(vipAddr);
105 msg->setClientAddress(clientAddr);
106 msg->setDstAddress(vipAddr);
126 filter(sock.get(), address, nextProtocolName, secureTransportType, tinfo);
127 }
catch (
const std::exception& e) {
128 sock->closeWithReset();
134 std::move(sock), address, nextProtocolName, secureTransportType, tinfo);
HTTPTransaction::Handler * newHandler(HTTPTransaction &txn, HTTPMessage *msg) noexceptoverride
folly::Optional< folly::AsyncSocket::OptionMap > acceptorSocketOptions
std::chrono::milliseconds transactionIdleTimeout
static AcceptorConfiguration makeConfig(const HTTPServer::IPConfig &ipConfig, const HTTPServerOptions &opts)
PUSHMI_INLINE_VAR constexpr detail::filter_fn filter
void onConnectionsDrained() override
std::chrono::milliseconds connectionIdleTimeout
const std::string kProtocolCleartextString
std::chrono::milliseconds idleTimeout
const HTTPServerOptions & serverOptions_
fbstring exceptionStr(const std::exception &e)
constexpr detail::Map< Move > move
uint32_t maxConcurrentIncomingStreams
std::function< void()> completionCallback_
NewConnectionFilter newConnectionFilter
folly::SocketAddress address
uint32_t maxConcurrentIncomingStreams
requires E e noexcept(noexcept(s.error(std::move(e))))
std::list< std::string > allowedPlaintextUpgradeProtocols
void onNewConnection(folly::AsyncTransportWrapper::UniquePtr sock, const folly::SocketAddress *address, const std::string &nextProtocol, wangle::SecureTransportType secureTransportType, const wangle::TransportInfo &tinfo) override
HTTPServerAcceptor(const AcceptorConfiguration &conf, const std::shared_ptr< HTTPCodecFactory > &codecFactory, std::vector< RequestHandlerFactory * > handlerFactories, const HTTPServerOptions &options)
folly::SocketAddress bindAddress
void setSocketOptions(const folly::AsyncSocket::OptionMap &opts)
std::unique_ptr< AsyncTransportWrapper, Destructor > UniquePtr
std::vector< wangle::SSLContextConfig > sslConfigs
uint32_t fastOpenQueueSize
size_t receiveSessionWindowSize
std::vector< std::unique_ptr< RequestHandlerFactory > > handlerFactories
bool allowInsecureConnectionsOnSecureServer
FOLLY_CPP14_CONSTEXPR bool hasValue() const noexcept
virtual void onRequest(std::unique_ptr< HTTPMessage > headers) noexcept=0
size_t initialReceiveWindow
bool allowInsecureConnectionsOnSecureServer
size_t receiveSessionWindowSize
void onNewConnection(folly::AsyncTransportWrapper::UniquePtr sock, const folly::SocketAddress *address, const std::string &nextProtocolName, wangle::SecureTransportType secureTransportType, const wangle::TransportInfo &tinfo) override
size_t initialReceiveWindow
TLSTicketKeySeeds initialTicketSeeds
const std::vector< RequestHandlerFactory * > handlerFactories_
void setCompletionCallback(std::function< void()> f)
std::string plaintextProtocol
FOLLY_CPP14_CONSTEXPR const Value & value() const &
static std::unique_ptr< HTTPServerAcceptor > make(const AcceptorConfiguration &conf, const HTTPServerOptions &opts, const std::shared_ptr< HTTPCodecFactory > &codecFactory=nullptr)
SettingsList egressSettings
size_t receiveStreamWindowSize
uint32_t fastOpenQueueSize
std::vector< SSLContextConfig > sslContextConfigs
~HTTPServerAcceptor() override
folly::Optional< wangle::TLSTicketKeySeeds > ticketSeeds
size_t receiveStreamWindowSize