Botan 3.4.0
Crypto and TLS for C&
Public Member Functions | List of all members
Botan::OS::Socket Class Referenceabstract

#include <socket.h>

Public Member Functions

virtual size_t read (uint8_t buf[], size_t len)=0
 
virtual void write (const uint8_t buf[], size_t len)=0
 
virtual ~Socket ()=default
 

Detailed Description

A wrapper around a simple blocking TCP socket

Definition at line 28 of file socket.h.

Constructor & Destructor Documentation

◆ ~Socket()

virtual Botan::OS::Socket::~Socket ( )
virtualdefault

The socket will be closed upon destruction

Member Function Documentation

◆ read()

virtual size_t Botan::OS::Socket::read ( uint8_t buf[],
size_t len )
pure virtual

Reads up to len bytes, returns bytes written to buf. Returns 0 on EOF. Throws on error.

◆ write()

virtual void Botan::OS::Socket::write ( const uint8_t buf[],
size_t len )
pure virtual

Write to the socket. Blocks until all bytes sent. Throws on error.


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