scclib
Stable Cloud Computing C++ Library
Public Member Functions | List of all members
scc::net::UnixAddr Class Reference

A unix domain address, which is a file of type "socket.". More...

#include <unix.h>

Inheritance diagram for scc::net::UnixAddr:
Inheritance graph
[legend]
Collaboration diagram for scc::net::UnixAddr:
Collaboration graph
[legend]

Public Member Functions

 UnixAddr ()
 IPv6 SocketBase address, initialized with "any" address.
 
 UnixAddr (const std::string &)
 
 UnixAddr (const sockaddr *)
 Initialize with socket address pointer.
 
 UnixAddr (const UnixAddr &)
 Copy create.
 
UnixAddroperator= (const UnixAddr &)
 Copy assign.
 
 UnixAddr (UnixAddr &&)
 Move create.
 
UnixAddroperator= (UnixAddr &&)
 Move assign.
 
virtual operator const sockaddr * () const
 Cast to const opaque socket address.
 
virtual operator sockaddr * ()
 Cast to opaque socket address.
 
virtual unsigned len () const
 Length of socket address.
 
virtual std::string str () const
 Descriptive string for socket address.
 
virtual std::string host () const
 Get host name. More...
 
void host (const std::string &)
 Set host name. More...
 

Detailed Description

A unix domain address, which is a file of type "socket.".

Examples
net/unittest/unix.cc.

Definition at line 58 of file unix.h.

Member Function Documentation

◆ host() [1/2]

std::string UnixAddr::host ( ) const
virtual

Get host name.

For unix domain sockets this is a file name.

Reimplemented from scc::net::SockaddrBase.

Definition at line 136 of file unix.cc.

◆ host() [2/2]

void UnixAddr::host ( const std::string &  h)

Set host name.

Set the unix socket filename.

For unix domain sockets this is a file name.

Must be < 108 chars.

This file file be created in the filesystem with type "socket".

Definition at line 123 of file unix.cc.


The documentation for this class was generated from the following files: