Kea 2.7.6
|
The DummyAsioSocket
class is a concrete derived class of IOAsioSocket
that is not associated with any real socket.
More...
#include <io_asio_socket.h>
Public Member Functions | |
DummyAsioSocket (const int protocol) | |
Constructor from the protocol number. | |
virtual void | asyncReceive (void *, size_t, size_t, IOEndpoint *, C &) |
Receive Asynchronously. | |
virtual void | asyncSend (const void *, size_t, const IOEndpoint *, C &) |
Send Asynchronously. | |
virtual void | cancel () |
Cancel I/O On AsioSocket. | |
virtual void | close () |
Close socket. | |
virtual int | getNative () const |
A dummy derived method of IOAsioSocket::getNative() . | |
virtual int | getProtocol () const |
A dummy derived method of IOAsioSocket::getProtocol() . | |
bool | isOpenSynchronous () const |
Is socket opening synchronous? | |
virtual bool | open (const IOEndpoint *, C &) |
Open AsioSocket. | |
virtual bool | receiveComplete (const void *, size_t, size_t &, size_t &, size_t &, isc::util::OutputBufferPtr &) |
Checks if the data received is complete. | |
Public Member Functions inherited from isc::asiolink::IOAsioSocket< C > | |
virtual | ~IOAsioSocket ()=default |
The destructor. | |
virtual bool | processReceivedData (const void *staging, size_t length, size_t &cumulative, size_t &offset, size_t &expected, isc::util::OutputBufferPtr &buff)=0 |
Processes received data. | |
Public Member Functions inherited from isc::asiolink::IOSocket | |
virtual | ~IOSocket () |
The destructor. | |
Additional Inherited Members | |
Public Types inherited from isc::asiolink::IOSocket | |
typedef boost::asio::socket_base::reuse_address | ReuseAddress |
Represents SO_REUSEADDR socket option. | |
Static Public Member Functions inherited from isc::asiolink::IOSocket | |
static IOSocket & | getDummyUDPSocket () |
Return a non-usable "dummy" UDP socket for testing. | |
static IOSocket & | getDummyTCPSocket () |
Return a non-usable "dummy" TCP socket for testing. | |
Protected Member Functions inherited from isc::asiolink::IOAsioSocket< C > | |
IOAsioSocket () | |
The default constructor. | |
Protected Member Functions inherited from isc::asiolink::IOSocket | |
IOSocket () | |
The default constructor. | |
The DummyAsioSocket
class is a concrete derived class of IOAsioSocket
that is not associated with any real socket.
This main purpose of this class is tests, where it may be desirable to instantiate an IOAsioSocket
object without involving system resource allocation such as real network sockets.
C | Template parameter identifying type of the callback object. |
Definition at line 293 of file io_asio_socket.h.
|
inline |
Constructor from the protocol number.
The protocol must validly identify a standard network protocol. For example, to specify TCP protocol
must be IPPROTO_TCP
.
protocol | The network protocol number for the socket. |
Definition at line 304 of file io_asio_socket.h.
|
inlinevirtual |
Receive Asynchronously.
Must be supplied as it is abstract in the base class. The parameters are unused.
Implements isc::asiolink::IOAsioSocket< C >.
Definition at line 347 of file io_asio_socket.h.
|
inlinevirtual |
Send Asynchronously.
Must be supplied as it is abstract in the base class. This is unused.
Implements isc::asiolink::IOAsioSocket< C >.
Definition at line 340 of file io_asio_socket.h.
|
inlinevirtual |
Cancel I/O On AsioSocket.
Must be supplied as it is abstract in the base class.
Implements isc::asiolink::IOAsioSocket< C >.
Definition at line 364 of file io_asio_socket.h.
|
inlinevirtual |
Close socket.
Must be supplied as it is abstract in the base class.
Implements isc::asiolink::IOAsioSocket< C >.
Definition at line 370 of file io_asio_socket.h.
|
inlinevirtual |
A dummy derived method of IOAsioSocket::getNative()
.
Implements isc::asiolink::IOAsioSocket< C >.
Definition at line 310 of file io_asio_socket.h.
|
inlinevirtual |
A dummy derived method of IOAsioSocket::getProtocol()
.
Implements isc::asiolink::IOAsioSocket< C >.
Definition at line 315 of file io_asio_socket.h.
|
inlinevirtual |
Is socket opening synchronous?
Implements isc::asiolink::IOAsioSocket< C >.
Definition at line 321 of file io_asio_socket.h.
|
inlinevirtual |
Open AsioSocket.
A call that is a no-op on UDP sockets, this opens a connection to the system identified by the given endpoint. The endpoint and callback are unused.
Implements isc::asiolink::IOAsioSocket< C >.
Definition at line 332 of file io_asio_socket.h.
|
inlinevirtual |
Checks if the data received is complete.
The parameters are unused.
Definition at line 354 of file io_asio_socket.h.