proxygen
folly::test::MockAsyncUDPSocket Struct Reference

#include <MockAsyncUDPSocket.h>

Inheritance diagram for folly::test::MockAsyncUDPSocket:
folly::AsyncUDPSocket folly::EventHandler

Public Member Functions

 MockAsyncUDPSocket (EventBase *evb)
 
 ~MockAsyncUDPSocket () override
 
 MOCK_CONST_METHOD0 (address, const SocketAddress &())
 
 MOCK_METHOD1 (bind, void(const SocketAddress &))
 
 MOCK_METHOD2 (setFD, void(NetworkSocket, AsyncUDPSocket::FDOwnership))
 
 MOCK_METHOD2 (write, ssize_t(const SocketAddress &, const std::unique_ptr< IOBuf > &))
 
 MOCK_METHOD3 (writeGSO, ssize_t(const folly::SocketAddress &, const std::unique_ptr< folly::IOBuf > &, int))
 
 MOCK_METHOD3 (writev, ssize_t(const SocketAddress &, const struct iovec *, size_t))
 
 MOCK_METHOD1 (resumeRead, void(ReadCallback *))
 
 MOCK_METHOD0 (pauseRead, void())
 
 MOCK_METHOD0 (close, void())
 
 MOCK_CONST_METHOD0 (getFD, int())
 
 MOCK_METHOD1 (setReusePort, void(bool))
 
 MOCK_METHOD1 (setReuseAddr, void(bool))
 
 MOCK_METHOD1 (dontFragment, void(bool))
 
 MOCK_METHOD1 (setErrMessageCallback, void(ErrMessageCallback *))
 
 MOCK_METHOD1 (connect, int(const SocketAddress &))
 
 MOCK_CONST_METHOD0 (isBound, bool())
 
 MOCK_METHOD0 (getGSO, int())
 
 MOCK_METHOD1 (setGSO, bool(int))
 
- Public Member Functions inherited from folly::AsyncUDPSocket
 AsyncUDPSocket (EventBase *evb)
 
 ~AsyncUDPSocket () override
 
virtual const folly::SocketAddressaddress () const
 
virtual void bind (const folly::SocketAddress &address)
 
void setFD (int fd, FDOwnership ownership)
 
virtual void setFD (NetworkSocket fd, FDOwnership ownership)
 
virtual ssize_t write (const folly::SocketAddress &address, const std::unique_ptr< folly::IOBuf > &buf)
 
virtual ssize_t writeGSO (const folly::SocketAddress &address, const std::unique_ptr< folly::IOBuf > &buf, int gso)
 
virtual ssize_t writev (const folly::SocketAddress &address, const struct iovec *vec, size_t veclen, int gso)
 
virtual ssize_t writev (const folly::SocketAddress &address, const struct iovec *vec, size_t veclen)
 
virtual void resumeRead (ReadCallback *cob)
 
virtual void pauseRead ()
 
virtual void close ()
 
virtual int getFD () const
 
virtual void setReusePort (bool reusePort)
 
virtual void setReuseAddr (bool reuseAddr)
 
virtual void setRcvBuf (int rcvBuf)
 
virtual void setSndBuf (int sndBuf)
 
virtual void setBusyPoll (int busyPollUs)
 
EventBasegetEventBase () const
 
virtual void dontFragment (bool df)
 
virtual void setErrMessageCallback (ErrMessageCallback *errMessageCallback)
 
virtual int connect (const folly::SocketAddress &address)
 
virtual bool isBound () const
 
virtual void detachEventBase ()
 
virtual void attachEventBase (folly::EventBase *evb)
 
int getGSO ()
 
bool setGSO (int val)
 
- Public Member Functions inherited from folly::EventHandler
 EventHandler (EventBase *eventBase, int fd)
 
 EventHandler (EventBase *eventBase=nullptr, NetworkSocket fd=NetworkSocket())
 
virtual ~EventHandler ()
 
bool registerHandler (uint16_t events)
 
void unregisterHandler ()
 
bool isHandlerRegistered () const
 
void attachEventBase (EventBase *eventBase)
 
void detachEventBase ()
 
void changeHandlerFD (int fd)
 
void changeHandlerFD (NetworkSocket fd)
 
void initHandler (EventBase *eventBase, int fd)
 
void initHandler (EventBase *eventBase, NetworkSocket fd)
 
uint16_t getRegisteredEvents () const
 
bool registerInternalHandler (uint16_t events)
 
bool isPending () const
 

Additional Inherited Members

- Public Types inherited from folly::AsyncUDPSocket
enum  FDOwnership { FDOwnership::OWNS, FDOwnership::SHARED }
 
- Public Types inherited from folly::EventHandler
enum  EventFlags {
  NONE = 0, READ = EV_READ, WRITE = EV_WRITE, READ_WRITE = (READ | WRITE),
  PERSIST = EV_PERSIST
}
 
- Protected Member Functions inherited from folly::AsyncUDPSocket
virtual ssize_t sendmsg (NetworkSocket socket, const struct msghdr *message, int flags)
 
size_t handleErrMessages () noexcept
 
void failErrMessageRead (const AsyncSocketException &ex)
 
- Protected Attributes inherited from folly::AsyncUDPSocket
ReadCallbackreadCallback_
 

Detailed Description

Definition at line 24 of file MockAsyncUDPSocket.h.

Constructor & Destructor Documentation

folly::test::MockAsyncUDPSocket::MockAsyncUDPSocket ( EventBase evb)
inlineexplicit

Definition at line 25 of file MockAsyncUDPSocket.h.

25 : AsyncUDPSocket(evb) {}
AsyncUDPSocket(EventBase *evb)

Member Function Documentation

folly::test::MockAsyncUDPSocket::MOCK_CONST_METHOD0 ( address  ,
const SocketAddress () 
)

Referenced by ~MockAsyncUDPSocket().

folly::test::MockAsyncUDPSocket::MOCK_CONST_METHOD0 ( getFD  ,
int()   
)
folly::test::MockAsyncUDPSocket::MOCK_CONST_METHOD0 ( isBound  ,
bool()   
)
folly::test::MockAsyncUDPSocket::MOCK_METHOD0 ( pauseRead  ,
void()   
)

Referenced by ~MockAsyncUDPSocket().

folly::test::MockAsyncUDPSocket::MOCK_METHOD0 ( close  ,
void()   
)
folly::test::MockAsyncUDPSocket::MOCK_METHOD0 ( getGSO  ,
int()   
)
folly::test::MockAsyncUDPSocket::MOCK_METHOD1 ( bind  ,
void(const SocketAddress &)   
)

Referenced by ~MockAsyncUDPSocket().

folly::test::MockAsyncUDPSocket::MOCK_METHOD1 ( resumeRead  ,
void(ReadCallback *)   
)
folly::test::MockAsyncUDPSocket::MOCK_METHOD1 ( setReusePort  ,
void(bool)   
)
folly::test::MockAsyncUDPSocket::MOCK_METHOD1 ( setReuseAddr  ,
void(bool)   
)
folly::test::MockAsyncUDPSocket::MOCK_METHOD1 ( dontFragment  ,
void(bool)   
)
folly::test::MockAsyncUDPSocket::MOCK_METHOD1 ( setErrMessageCallback  ,
void(ErrMessageCallback *)   
)
folly::test::MockAsyncUDPSocket::MOCK_METHOD1 ( connect  ,
int(const SocketAddress &)   
)
folly::test::MockAsyncUDPSocket::MOCK_METHOD1 ( setGSO  ,
bool(int)   
)
folly::test::MockAsyncUDPSocket::MOCK_METHOD2 ( setFD  ,
void(NetworkSocket, AsyncUDPSocket::FDOwnership  
)

Referenced by ~MockAsyncUDPSocket().

folly::test::MockAsyncUDPSocket::MOCK_METHOD2 ( write  ,
ssize_t(const SocketAddress &, const std::unique_ptr< IOBuf > &)   
)
folly::test::MockAsyncUDPSocket::MOCK_METHOD3 ( writeGSO  ,
ssize_t(const folly::SocketAddress &, const std::unique_ptr< folly::IOBuf > &, int)   
)

Referenced by ~MockAsyncUDPSocket().

folly::test::MockAsyncUDPSocket::MOCK_METHOD3 ( writev  ,
ssize_t(const SocketAddress &, const struct iovec *, size_t)   
)

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