7#ifndef IO_ASIO_SOCKET_H
8#define IO_ASIO_SOCKET_H 1
26#include <boost/asio/coroutine.hpp>
82class IOAsioSocket :
public IOSocket {
92 IOAsioSocket& operator=(
const IOAsioSocket<C>& source);
265 size_t& offset,
size_t& expected,
286class DummyAsioSocket :
public IOAsioSocket<C> {
288 DummyAsioSocket(
const DummyAsioSocket<C>& source);
289 DummyAsioSocket& operator=(
const DummyAsioSocket<C>& source);
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)
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?
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.
IOError(const char *file, size_t line, const char *what)
SocketNotOpen(const char *file, size_t line, const char *what)
SocketSetError(const char *file, size_t line, const char *what)
boost::shared_ptr< OutputBuffer > OutputBufferPtr
Type of pointers to output buffers.
Defines the logger used by the top-level component of kea-lfc.