Mixes for Privacy and Anonymity in the Internet
Public Member Functions | List of all members
CASocketAddr Class Referenceabstract

This is an abstract class for representing a socket address used in CASocket, CADatagramSocket and CAMuxSocket. More...

Inheritance diagram for CASocketAddr:
CASocketAddrINet CASocketAddrUnix

Public Member Functions

virtual ~CASocketAddr ()
 
virtual CASocketAddrclone () const =0
 Creates a copy of the Address. More...
 
virtual SINT32 getType () const =0
 The type (family) of socket for which this address is useful. More...
 
virtual SINT32 getSize () const =0
 The size of the SOCKADDR struct needed by function of CASocket and other. More...
 
virtual const SOCKADDRLPSOCKADDR () const =0
 Casts to a SOCKADDR struct. More...
 
virtual SINT32 toString (UINT8 *buff, UINT32 bufflen) const =0
 Returns a string which describes this address in a human readable form. More...
 

Detailed Description

This is an abstract class for representing a socket address used in CASocket, CADatagramSocket and CAMuxSocket.

Constructor & Destructor Documentation

◆ ~CASocketAddr()

virtual CASocketAddr::~CASocketAddr ( )
virtual

Member Function Documentation

◆ clone()

virtual CASocketAddr* CASocketAddr::clone ( ) const
pure virtual

◆ getSize()

virtual SINT32 CASocketAddr::getSize ( ) const
pure virtual

The size of the SOCKADDR struct needed by function of CASocket and other.

Implemented in CASocketAddrUnix, and CASocketAddrINet.

Referenced by CADatagramSocket::bind(), CASocket::connect(), CASocket::listen(), CADatagramSocket::receive(), and CADatagramSocket::send().

◆ getType()

virtual SINT32 CASocketAddr::getType ( ) const
pure virtual

The type (family) of socket for which this address is useful.

Must be overwritten in subclasses.

Implemented in CASocketAddrUnix, and CASocketAddrINet.

Referenced by CAMuxSocket::accept(), CACacheLoadBalancing::add(), CADatagramSocket::bind(), CASocket::connect(), CACmdLnOptions::createSockets(), CAFirstMix::init(), CAMiddleMix::init(), and CASocket::listen().

◆ LPSOCKADDR()

virtual const SOCKADDR* CASocketAddr::LPSOCKADDR ( ) const
pure virtual

◆ toString()

virtual SINT32 CASocketAddr::toString ( UINT8 buff,
UINT32  bufflen 
) const
pure virtual

Returns a string which describes this address in a human readable form.

Parameters
buffbuffer which stores the result
bufflensize of buff
Return values
E_SUCCESSif successful
E_SPACEif the buffer is to small
E_UNKNOWNin case of an other error

Implemented in CASocketAddrUnix, and CASocketAddrINet.

Referenced by CAFirstMix::connectToNextMix(), CAMiddleMix::connectToNextMix(), CACmdLnOptions::createSockets(), CALastMix::init(), CAMiddleMix::init(), and CACmdLnOptions::setTargetInterfaces().