42 class ManagedConnection;
43 class SecurityProtocolContextManager;
44 class SSLContextManager;
79 const std::shared_ptr<SSLCacheProvider>& cacheProvider) {
112 const std::vector<std::string>& oldSecrets,
113 const std::vector<std::string>& currentSecrets,
114 const std::vector<std::string>& newSecrets);
210 std::chrono::steady_clock::time_point acceptTime
219 std::chrono::steady_clock::time_point acceptTime,
230 std::chrono::steady_clock::time_point acceptTime,
307 std::chrono::milliseconds ,
360 std::shared_ptr<folly::AsyncUDPSocket> ,
362 std::unique_ptr<folly::IOBuf>,
363 bool) noexcept
override {}
373 const std::shared_ptr<folly::SSLContext>& ctx,
folly::EventBase* base,
int fd) {
398 void acceptError(
const std::exception& ex) noexcept
override;
409 std::shared_ptr<const LoadShedConfiguration> loadShedConfig,
418 virtual std::shared_ptr<fizz::server::TicketCipher>
std::chrono::milliseconds getConnTimeout() const
void onEmpty(const wangle::ConnectionManager &cm) override
const ServerSocketConfig & getConfig() const
virtual uint64_t getWorkerMaxConnections() const
virtual folly::AsyncSocket::UniquePtr makeNewAsyncSocket(folly::EventBase *base, int fd)
void connectionReady(folly::AsyncTransportWrapper::UniquePtr sock, const folly::SocketAddress &clientAddr, const std::string &nextProtocolName, SecureTransportType secureTransportType, TransportInfo &tinfo)
void setLoadShedConfig(std::shared_ptr< const LoadShedConfiguration > loadShedConfig, const IConnectionCounter *counter)
uint32_t getNumConnections() const
void addSSLContextConfig(const SSLContextConfig &sslCtxConfig)
virtual void setTLSTicketSecrets(const std::vector< std::string > &oldSecrets, const std::vector< std::string > ¤tSecrets, const std::vector< std::string > &newSecrets)
std::chrono::milliseconds getSSLHandshakeTimeout() const
wangle::TLSTicketKeySeeds currentSecrets_
uint64_t numPendingSSLConns_
void processEstablishedConnection(int fd, const folly::SocketAddress &clientAddr, std::chrono::steady_clock::time_point acceptTime, TransportInfo &tinfo) noexcept
std::unique_ptr< ConnectionManager, Destructor > UniquePtr
virtual uint64_t getMaxConnections() const =0
const IConnectionCounter * connectionCounter_
static uint64_t getTotalNumPendingSSLConns()
std::shared_ptr< SSLCacheProvider > cacheProvider_
SSLContextManager * getSSLContextManager() const
virtual void initDownstreamConnectionManager(folly::EventBase *eventBase)
wangle::ConnectionManager::UniquePtr downstreamConnectionManager_
bool forceShutdownInProgress_
std::shared_ptr< const LoadShedConfiguration > loadShedConfig_
virtual void onDoneAcceptingConnection(int fd, const folly::SocketAddress &clientAddr, std::chrono::steady_clock::time_point acceptTime) noexcept
virtual void dropConnections(double pctToDrop)
requires E e noexcept(noexcept(s.error(std::move(e))))
virtual void setSSLCacheProvider(const std::shared_ptr< SSLCacheProvider > &cacheProvider)
static std::atomic< uint64_t > totalNumPendingSSLConns_
virtual void drainConnections(double pctToDrain)
virtual void updateSSLStats(const folly::AsyncTransportWrapper *, std::chrono::milliseconds, SSLErrorEnum) noexcept
virtual std::shared_ptr< fizz::server::TicketCipher > createFizzTicketCipher(folly::Optional< std::string >=folly::none)
void onDataAvailable(std::shared_ptr< folly::AsyncUDPSocket >, const folly::SocketAddress &, std::unique_ptr< folly::IOBuf >, bool) noexceptoverride
void acceptStopped() noexceptoverride
std::chrono::milliseconds getGracefulShutdownTimeout() const
virtual void startHandshakeManager(folly::AsyncSSLSocket::UniquePtr sslSock, Acceptor *acceptor, const folly::SocketAddress &clientAddr, std::chrono::steady_clock::time_point acceptTime, TransportInfo &tinfo) noexcept
void acceptError(const std::exception &ex) noexceptoverride
folly::AsyncSocket::OptionMap socketOptions_
const std::string & getName() const
std::unique_ptr< AsyncSSLSocket, Destructor > UniquePtr
std::map< OptionKey, int > OptionMap
std::unique_ptr< AsyncTransportWrapper, Destructor > UniquePtr
virtual void onConnectionsDrained()
std::chrono::milliseconds sslHandshakeTimeout
void updateFizzContext(fizz::server::FizzServerContext *)
Acceptor(const ServerSocketConfig &accConfig)
virtual DefaultToFizzPeekingCallback * getFizzPeeker()
const ServerSocketConfig accConfig_
void addConnection(wangle::ManagedConnection *connection)
virtual uint64_t getActiveConnectionCountForLoadShedding() const
virtual void plaintextConnectionReady(folly::AsyncTransportWrapper::UniquePtr sock, const folly::SocketAddress &clientAddr, const std::string &nextProtocolName, SecureTransportType secureTransportType, TransportInfo &tinfo)
virtual uint64_t getConnectionCountForLoadShedding(void) const
DefaultToSSLPeekingCallback defaultPeekingCallback_
SecurityProtocolContextManager securityProtocolCtxManager_
virtual void sslConnectionReady(folly::AsyncTransportWrapper::UniquePtr sock, const folly::SocketAddress &clientAddr, const std::string &nextProtocol, SecureTransportType secureTransportType, TransportInfo &tinfo)
void onListenStarted() noexceptoverride
void onListenStopped() noexceptoverride
virtual std::shared_ptr< fizz::server::FizzServerContext > createFizzContext()
virtual wangle::ConnectionManager * getConnectionManager()
std::atomic< int > counter
std::chrono::milliseconds gracefulShutdownTimeout_
virtual bool canAccept(const folly::SocketAddress &)
virtual void sslConnectionError(const folly::exception_wrapper &ex)
void connectionAccepted(int fd, const folly::SocketAddress &clientAddr) noexceptoverride
void onConnectionRemoved(const ManagedConnection *) override
void setGracefulShutdownTimeout(std::chrono::milliseconds gracefulShutdown)
TLSPlaintextPeekingCallback tlsPlaintextPeekingCallback_
virtual void resetSSLContextConfigs()
virtual folly::EventBase * getEventBase() const
DefaultToFizzPeekingCallback defaultFizzPeeker_
std::unique_ptr< AsyncSocket, Destructor > UniquePtr
void onConnectionAdded(const ManagedConnection *) override
std::unique_ptr< SSLContextManager > sslCtxManager_
virtual folly::AsyncSSLSocket::UniquePtr makeNewAsyncSSLSocket(const std::shared_ptr< folly::SSLContext > &ctx, folly::EventBase *base, int fd)
virtual void init(folly::AsyncServerSocket *serverSocket, folly::EventBase *eventBase, SSLStats *stats=nullptr)
virtual void onNewConnection(folly::AsyncTransportWrapper::UniquePtr, const folly::SocketAddress *, const std::string &, SecureTransportType, const TransportInfo &)
void drainAllConnections()
void dropAllConnections()
Acceptor & operator=(Acceptor const &)=delete