7#ifndef IO_ASIO_SOCKET_H
8#define IO_ASIO_SOCKET_H 1
29#ifndef HAVE_BOOST_ASIO_COROUTINE_HPP
30#include <ext/coroutine/coroutine.hpp>
32#include <boost/asio/coroutine.hpp>
272 size_t& offset,
size_t& expected,
virtual const char * what() const
Returns a C-style character string of the cause of the exception.
BufferOverflow(const char *file, size_t line, const char *what)
The DummyAsioSocket class is a concrete derived class of IOAsioSocket that is not associated with any...
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.
virtual int getProtocol() const
A dummy derived method of IOAsioSocket::getProtocol().
virtual void asyncReceive(void *, size_t, size_t, IOEndpoint *, C &)
Receive Asynchronously.
virtual void cancel()
Cancel I/O On AsioSocket.
DummyAsioSocket(const int protocol)
Constructor from the protocol number.
virtual void asyncSend(const void *, size_t, const IOEndpoint *, C &)
Send Asynchronously.
virtual void close()
Close socket.
virtual int getNative() const
A dummy derived method of IOAsioSocket::getNative().
bool isOpenSynchronous() const
Is socket opening synchronous?
I/O Socket with asynchronous operations.
virtual void close()=0
Close socket.
virtual int getProtocol() const =0
Return the transport protocol of the socket.
virtual void open(const IOEndpoint *endpoint, C &callback)=0
Open AsioSocket.
virtual void cancel()=0
Cancel I/O On AsioSocket.
virtual ~IOAsioSocket()=default
The destructor.
IOAsioSocket()
The default constructor.
virtual bool isOpenSynchronous() const =0
Is Open() synchronous?
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.
virtual void asyncSend(const void *data, size_t length, const IOEndpoint *endpoint, C &callback)=0
Send Asynchronously.
virtual int getNative() const =0
Return the "native" representation of the socket.
virtual void asyncReceive(void *data, size_t length, size_t offset, IOEndpoint *endpoint, C &callback)=0
Receive Asynchronously.
The IOEndpoint class is an abstract base class to represent a communication endpoint.
An exception that is thrown if an error occurs within the IO module.
The IOSocket class is an abstract base class to represent various types of network sockets.
SocketNotOpen(const char *file, size_t line, const char *what)
Error setting socket options.
SocketSetError(const char *file, size_t line, const char *what)
A wrapper interface for the ASIO library.
boost::shared_ptr< OutputBuffer > OutputBufferPtr
Type of pointers to output buffers.
Defines the logger used by the top-level component of kea-lfc.