10Duke Scale C++ Client
Loading...
Searching...
No Matches
tenduke::test::mocks::SocketMock Class Reference
Inheritance diagram for tenduke::test::mocks::SocketMock:
tenduke::osa::Socket

Public Member Functions

 MOCK_METHOD ((std::unique_ptr< tenduke::osa::Socket >), accept,(std::uint32_t timeoutMs),(override))
 
 MOCK_METHOD ((std::unique_ptr< tenduke::osa::Socket >), accept,(),(override))
 
 MOCK_METHOD (void, listen,(),(override))
 
 MOCK_METHOD (int, read,(void *buffer, std::size_t bufferSize),(override))
 
 MOCK_METHOD (int, write,(const void *buffer, std::size_t bufferSize),(override))
 
 MOCK_METHOD (std::uint16_t, getPort,(),(const, override))
 
 MOCK_METHOD (void, setNonBlocking,(),(override))
 
- Public Member Functions inherited from tenduke::osa::Socket
virtual std::unique_ptr< Socketaccept (uint32_t timeoutMs)=0
 Accepts next connection from listening socket, with a timeout.
 
virtual std::unique_ptr< Socketaccept ()=0
 Accepts next connection from listening socket.
 
virtual void listen ()=0
 Configures the socket to listen for incoming connections.
 
virtual int read (void *buffer, std::size_t bufferSize)=0
 Reads bytes from the socket.
 
virtual int write (const void *buffer, std::size_t len)=0
 Write bytes to the socket.
 
virtual std::uint16_t getPort () const =0
 Returns port of the socket.
 
virtual void setNonBlocking ()=0
 Sets the socket to non-blocking mode.
 

Static Public Member Functions

static std::shared_ptr< SocketMockcreateShared ()
 

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