proxygen
folly::test::MockAsyncServerSocket Class Reference

#include <MockAsyncServerSocket.h>

Inheritance diagram for folly::test::MockAsyncServerSocket:
folly::AsyncServerSocket folly::DelayedDestruction folly::AsyncSocketBase folly::DelayedDestructionBase

Public Types

typedef std::unique_ptr< MockAsyncServerSocket, DestructorUniquePtr
 
- Public Types inherited from folly::AsyncServerSocket
typedef std::unique_ptr< AsyncServerSocket, DestructorUniquePtr
 

Public Member Functions

 MOCK_METHOD1 (bind, void(const folly::SocketAddress &address))
 
 MOCK_METHOD2 (bind, void(const std::vector< folly::IPAddress > &ipAddresses, uint16_t port))
 
 MOCK_METHOD1 (bind, void(uint16_t port))
 
 MOCK_METHOD1 (listen, void(int backlog))
 
 MOCK_METHOD0 (startAccepting, void())
 
 MOCK_METHOD3 (addAcceptCallback, void(AcceptCallback *callback, EventBase *eventBase, uint32_t maxAtOnce))
 
- Public Member Functions inherited from folly::AsyncServerSocket
 AsyncServerSocket (AsyncServerSocket &&)=delete
 
 AsyncServerSocket (EventBase *eventBase=nullptr)
 
void setShutdownSocketSet (const std::weak_ptr< ShutdownSocketSet > &wNewSS)
 
void destroy () override
 
void attachEventBase (EventBase *eventBase)
 
void detachEventBase ()
 
EventBasegetEventBase () const override
 
void useExistingSocket (int fd)
 
void useExistingSockets (const std::vector< int > &fds)
 
std::vector< int > getSockets () const
 
int getSocket () const
 
bool setZeroCopy (bool enable)
 
virtual void bind (const SocketAddress &address)
 
virtual void bind (const std::vector< IPAddress > &ipAddresses, uint16_t port)
 
virtual void bind (uint16_t port)
 
void getAddress (SocketAddress *addressReturn) const override
 
SocketAddress getAddress () const
 
std::vector< SocketAddressgetAddresses () const
 
virtual void listen (int backlog)
 
virtual void addAcceptCallback (AcceptCallback *callback, EventBase *eventBase, uint32_t maxAtOnce=kDefaultCallbackAcceptAtOnce)
 
void removeAcceptCallback (AcceptCallback *callback, EventBase *eventBase)
 
virtual void startAccepting ()
 
void pauseAccepting ()
 
int stopAccepting (int shutdownFlags=-1)
 
uint32_t getMaxAcceptAtOnce () const
 
void setMaxAcceptAtOnce (uint32_t numConns)
 
uint32_t getMaxNumMessagesInQueue () const
 
void setMaxNumMessagesInQueue (uint32_t num)
 
double getAcceptRateAdjustSpeed () const
 
void setAcceptRateAdjustSpeed (double speed)
 
void setTosReflect (bool enable)
 
bool getTosReflect ()
 
std::size_t getNumDroppedConnections () const
 
int64_t getNumPendingMessagesInQueue () const
 
void setKeepAliveEnabled (bool enabled)
 
bool getKeepAliveEnabled () const
 
void setReusePortEnabled (bool enabled)
 
bool getReusePortEnabled_ () const
 
void setCloseOnExec (bool closeOnExec)
 
bool getCloseOnExec () const
 
void setTFOEnabled (bool enabled, uint32_t maxTFOQueueSize)
 
void disableTransparentTls ()
 
bool getAccepting () const
 
void setConnectionEventCallback (ConnectionEventCallback *const connectionEventCallback)
 
ConnectionEventCallbackgetConnectionEventCallback () const
 
- Public Member Functions inherited from folly::DelayedDestruction
bool getDestroyPending () const
 
- Public Member Functions inherited from folly::DelayedDestructionBase
virtual ~DelayedDestructionBase ()=default
 
- Public Member Functions inherited from folly::AsyncSocketBase
virtual ~AsyncSocketBase ()=default
 

Additional Inherited Members

- Static Public Member Functions inherited from folly::AsyncServerSocket
static std::shared_ptr< AsyncServerSocketnewSocket (EventBase *evb=nullptr)
 
- Static Public Attributes inherited from folly::AsyncServerSocket
static const uint32_t kDefaultMaxAcceptAtOnce = 30
 
static const uint32_t kDefaultCallbackAcceptAtOnce = 5
 
static const uint32_t kDefaultMaxMessagesInQueue = 1024
 
- Protected Member Functions inherited from folly::AsyncServerSocket
 ~AsyncServerSocket () override
 
- Protected Member Functions inherited from folly::DelayedDestruction
 ~DelayedDestruction () override=default
 
 DelayedDestruction ()
 
- Protected Member Functions inherited from folly::DelayedDestructionBase
 DelayedDestructionBase ()
 
uint32_t getDestructorGuardCount () const
 

Detailed Description

Definition at line 26 of file MockAsyncServerSocket.h.

Member Typedef Documentation

Member Function Documentation

folly::test::MockAsyncServerSocket::MOCK_METHOD0 ( startAccepting  ,
void()   
)
folly::test::MockAsyncServerSocket::MOCK_METHOD1 ( bind  ,
void(const folly::SocketAddress &address)   
)
folly::test::MockAsyncServerSocket::MOCK_METHOD1 ( bind  ,
void(uint16_t port)   
)
folly::test::MockAsyncServerSocket::MOCK_METHOD1 ( listen  ,
void(int backlog)   
)
folly::test::MockAsyncServerSocket::MOCK_METHOD2 ( bind  ,
void(const std::vector< folly::IPAddress > &ipAddresses, uint16_t port)   
)
folly::test::MockAsyncServerSocket::MOCK_METHOD3 ( addAcceptCallback  ,
void(AcceptCallback *callback, EventBase *eventBase, uint32_t maxAtOnce)   
)

The documentation for this class was generated from the following file: