PREV UP NEXT C++ socket classes for OS/2

Chapter 8: sockunixaddr Class

Class sockunixaddr is derived from class sockAddr declared in <sockstream.h> and from struct sockaddr_un declared in <sys/un.h>. Always use sockunixaddr objects for addresses with unix domain of sockets. See Connection Establishment.

In what follows,

sockunixaddr suna(path)
Constructs a sockunixaddr object suna with path as the unix path name.
void* a = suna
returns the address of the sockaddr_un part of sockunixaddr object suna as void*.
int sz = suna.size()
returns the sizeof sockaddr_un part of sockunixaddr object suna.
int af = suna.family()
returns sockunixbuf::af_unix if all is well.