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,
path
is the unix path name like "/tmp/unix_socket"
sockunixaddr suna(path)
sockunixaddr
object suna
with path
as
the unix path name.
void* a = suna
sockaddr_un
part of
sockunixaddr
object suna
as void*.
int sz = suna.size()
sockaddr_un
part of sockunixaddr
object
suna
.
int af = suna.family()
sockunixbuf::af_unix
if all is well.