index previous next 

file name: sockunix.hpp, sockunix.cpp
classification: simulation
contents: class CUnixAddress
derived from: class ACSocketAddress
use: provides a UNIX domain socket address
 

Note: the implementation file contains a second implementation which I use in Windows (there, the socket libs of UNIX and pSOS are not available). The implementation is only a dummy, it does not do anything but assert that the name paramater in the first constructor is not NULL. All functions with return values return 0. The description below is valid if DOS_SIM is not defined.
 

global items used:

member variables:

sockaddr_un* addr_: pointer to the UNIX address structure.
 

member functions:

CUnixAddress (const char* name): Creates a new object of type sockaddr_un (UNIX domain address structure), stores the name in the sun_path variable and sets its address family to AF_UNIX.

CUnixAddress (const CUnixAddress &un): Creates a new object of type sockaddr_un and copies family and path from parameter un.

virtual ~CUnixAddress(): Deletes the address structure.

virtual sockaddr* Addr(): returns a pointer to the address structure itself, which is cast to the base address structure sockaddr.

virtual int Family(): should always returns AF_UNIX.

virtual int Size(): returns the size of the address structure.


last modified: Fri Feb 5 18:56:35 1999