AUI Framework  master
Cross-platform base for C++ UI apps
Loading...
Searching...
No Matches
AAbstractSocket Class Referenceabstract

Base class for all sockets.

#include <AUI/Network/AAbstractSocket.h>

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)
 Binds socket for port. Used for ATcpServerSocket and AUdpSocket.
 
virtual int createSocket ()=0
 Creates socket handle.
 

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
Parameters
bindingPortport

◆ createSocket()#

virtual int AAbstractSocket::createSocket ( )
protectedpure virtual

Implemented in ATcpServerSocket, ATcpSocket, and AUdpSocket.