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