AUI Framework  master
Cross-platform module-based framework for developing C++20 desktop applications
AAbstractSocket Class Referenceabstract

Base class for all sockets. More...

Detailed Description

Base class for all sockets.

Public Member Functions

 AAbstractSocket (const AAbstractSocket &)=delete
 
void close ()
 
void setTimeout (int secs)
 
const AInet4AddressgetAddress () const
 

Protected Member Functions

int getHandle () const
 
 AAbstractSocket (int handle, const AInet4Address &selfAddress)
 
void init ()
 Initialise socket.
 
void bind (uint16_t bindingPort)
 Bind socket for port. Used for ATcpServerSocket and AUdpSocket. More...
 
virtual int createSocket ()=0
 Create socket handle. Use ::socket() More...
 

Static Protected Member Functions

static AString getErrorString ()
 
static void handleError (const AString &message, int code)
 

Member Function Documentation

◆ bind()

void AAbstractSocket::bind ( uint16_t  bindingPort)
protected

Bind socket for port. Used for ATcpServerSocket and AUdpSocket.

Parameters
bindingPortport

◆ createSocket()

virtual int AAbstractSocket::createSocket ( )
protectedpure virtual

Create socket handle. Use ::socket()

Implemented in ATcpServerSocket, ATcpSocket, and AUdpSocket.

#include <AUI/Network/AAbstractSocket.h>


The documentation for this class was generated from the following files:
Inheritance diagram for AAbstractSocket: