MeVisLab Toolbox Reference
asio::Socket Class Referenceabstract

Abstract base class for an asynchronous channel supporting read and write of binary data. More...

#include <Socket.h>

Inheritance diagram for asio::Socket:
asio::TcpSocket asio::TlsSocket

Public Types

using CompletionHandler = std::function<void(const ErrorCode&, const std::size_t )>
 

Public Member Functions

virtual ~Socket ()=default
 
virtual bool is_valid () const =0
 
virtual void async_read (void *buffer, const std::size_t buffer_size, const CompletionHandler &handler)=0
 
virtual void async_write (const void *buffer, const std::size_t buffer_size, const CompletionHandler &handler)=0
 
virtual void close ()=0
 

Detailed Description

Abstract base class for an asynchronous channel supporting read and write of binary data.

This interface is used by the networking socket implementations to abstract protocols and transport layer security.

For more information have a look at asio::TcpSocket and asio::TlsSocket.

Definition at line 23 of file Socket.h.

Member Typedef Documentation

◆ CompletionHandler

using asio::Socket::CompletionHandler = std::function<void(const ErrorCode&, const std::size_t )>

Definition at line 27 of file Socket.h.

Constructor & Destructor Documentation

◆ ~Socket()

virtual asio::Socket::~Socket ( )
virtualdefault

Member Function Documentation

◆ async_read()

virtual void asio::Socket::async_read ( void * buffer,
const std::size_t buffer_size,
const CompletionHandler & handler )
pure virtual

Implemented in asio::TcpSocket, and asio::TlsSocket.

◆ async_write()

virtual void asio::Socket::async_write ( const void * buffer,
const std::size_t buffer_size,
const CompletionHandler & handler )
pure virtual

Implemented in asio::TcpSocket, and asio::TlsSocket.

◆ close()

virtual void asio::Socket::close ( )
pure virtual

Implemented in asio::TcpSocket, and asio::TlsSocket.

◆ is_valid()

virtual bool asio::Socket::is_valid ( ) const
pure virtual

Implemented in asio::TcpSocket, and asio::TlsSocket.


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