Toolbox snapshot
The Reactive C++ Toolbox
Loading...
Searching...
No Matches
Functions
toolbox::os Namespace Reference

Functions

FileHandle epoll_create (int size, std::error_code &ec) noexcept
 
FileHandle epoll_create (int size)
 
FileHandle epoll_create1 (int flags, std::error_code &ec) noexcept
 Open a new epoll instance. If flags is zero, then epoll_create1() is the same as epoll_create().
 
FileHandle epoll_create1 (int flags)
 Open a new epoll instance. If flags is zero, then epoll_create1() is the same as epoll_create().
 
int epoll_ctl (int epfd, int op, int fd, epoll_event event, std::error_code &ec) noexcept
 Control interface for an epoll file descriptor.
 
void epoll_ctl (int epfd, int op, int fd, epoll_event event)
 Control interface for an epoll file descriptor.
 
int epoll_wait (int epfd, epoll_event *events, int maxevents, int timeout, std::error_code &ec) noexcept
 Wait for an I/O event on an epoll file descriptor.
 
int epoll_wait (int epfd, epoll_event *events, int maxevents, int timeout)
 Wait for an I/O event on an epoll file descriptor.
 
FileHandle eventfd (unsigned intval, int flags, std::error_code &ec) noexcept
 Create a file descriptor for event notification.
 
FileHandle eventfd (unsigned intval, int flags)
 Create a file descriptor for event notification.
 
FileHandle open (const char *path, int flags, mode_t mode, std::error_code &ec) noexcept
 Open and possibly create a file.
 
FileHandle open (const char *path, int flags, mode_t mode)
 Open and possibly create a file.
 
FileHandle open (const char *path, int flags, std::error_code &ec) noexcept
 Open and possibly create a file.
 
FileHandle open (const char *path, int flags)
 Open and possibly create a file.
 
int remove (const char *path)
 
int remove (const char *path, std::error_code &ec) noexcept
 
std::pair< FileHandle, FileHandlepipe2 (int flags, std::error_code &ec) noexcept
 Create pipe.
 
std::pair< FileHandle, FileHandlepipe2 (int flags)
 Create pipe.
 
void fstat (int fd, struct stat &statbuf, std::error_code &ec) noexcept
 Get file status.
 
void fstat (int fd, struct stat &statbuf)
 Get file status.
 
void ftruncate (int fd, off_t length, std::error_code &ec) noexcept
 Truncate a file to a specified length.
 
void ftruncate (int fd, off_t length)
 Truncate a file to a specified length.
 
ssize_t read (int fd, void *buf, std::size_t len, std::error_code &ec) noexcept
 Read from a file descriptor.
 
std::size_t read (int fd, void *buf, std::size_t len)
 Read from a file descriptor.
 
ssize_t read (int fd, MutableBuffer buf, std::error_code &ec) noexcept
 Read from a file descriptor.
 
std::size_t read (int fd, MutableBuffer buf) noexcept
 Read from a file descriptor.
 
ssize_t write (int fd, const void *buf, std::size_t len, std::error_code &ec) noexcept
 Write to a file descriptor.
 
std::size_t write (int fd, const void *buf, std::size_t len)
 Write to a file descriptor.
 
ssize_t write (int fd, ConstBuffer buf, std::error_code &ec) noexcept
 Write to a file descriptor.
 
std::size_t write (int fd, ConstBuffer buf)
 Write to a file descriptor.
 
int fcntl (int fd, int cmd, std::error_code &ec) noexcept
 File control.
 
template<typename ArgT >
int fcntl (int fd, int cmd, ArgT arg, std::error_code &ec) noexcept
 File control.
 
int fcntl (int fd, int cmd)
 File control.
 
template<typename ArgT >
int fcntl (int fd, int cmd, ArgT arg)
 File control.
 
FileHandle timerfd_create (int clock_id, int flags, std::error_code &ec) noexcept
 Create a file descriptor for timer notification.
 
FileHandle timerfd_create (int clock_id, int flags)
 Create a file descriptor for timer notification.
 
void timerfd_settime (int fd, int flags, const itimerspec &new_value, itimerspec &old_value, std::error_code &ec) noexcept
 Arm or disarm timer.
 
void timerfd_settime (int fd, int flags, const itimerspec &new_value, itimerspec &old_value)
 Arm or disarm timer.
 
void timerfd_settime (int fd, int flags, const itimerspec &new_value, std::error_code &ec) noexcept
 Arm or disarm timer.
 
void timerfd_settime (int fd, int flags, const itimerspec &new_value)
 Arm or disarm timer.
 
template<typename ClockT >
void timerfd_settime (int fd, int flags, std::chrono::time_point< ClockT, Duration > expiry, Duration interval, std::error_code &ec) noexcept
 Arm or disarm timer.
 
template<typename ClockT >
void timerfd_settime (int fd, int flags, std::chrono::time_point< ClockT, Duration > expiry, Duration interval)
 Arm or disarm timer.
 
template<typename ClockT >
void timerfd_settime (int fd, int flags, std::chrono::time_point< ClockT, Duration > expiry, std::error_code &ec) noexcept
 Arm or disarm timer.
 
template<typename ClockT >
void timerfd_settime (int fd, int flags, std::chrono::time_point< ClockT, Duration > expiry)
 Arm or disarm timer.
 
AddrInfoPtr getaddrinfo (const char *node, const char *service, const addrinfo &hints, std::error_code &ec) noexcept
 Get network address from Internet host and service.
 
AddrInfoPtr getaddrinfo (const char *node, const char *service, const addrinfo &hints)
 Get network address from Internet host and service.
 
AddrInfoPtr getaddrinfo (const char *node, const char *service, int family, int type, int protocol, std::error_code &ec) noexcept
 Get network address from Internet host and service.
 
AddrInfoPtr getaddrinfo (const char *node, const char *service, int family, int type, int protocol)
 Get network address from Internet host and service.
 
template<typename ProtocolT >
AddrInfoPtr getaddrinfo (const char *node, const char *service, ProtocolT protocol, std::error_code &ec) noexcept
 Get network address from Internet host and service.
 
template<typename ProtocolT >
AddrInfoPtr getaddrinfo (const char *node, const char *service, ProtocolT protocol)
 Get network address from Internet host and service.
 
unsigned if_nametoindex (const char *ifname, std::error_code &ec) noexcept
 Returns the index of the network interface corresponding to the name ifname.
 
unsigned if_nametoindex (const char *ifname)
 Returns the index of the network interface corresponding to the name ifname.
 
FileHandle socket (int family, int type, int protocol, std::error_code &ec) noexcept
 Create an endpoint for communication.
 
FileHandle socket (int family, int type, int protocol)
 Create an endpoint for communication.
 
template<typename ProtocolT >
FileHandle socket (ProtocolT protocol, std::error_code &ec) noexcept
 Create an endpoint for communication.
 
template<typename ProtocolT >
FileHandle socket (ProtocolT protocol)
 Create an endpoint for communication.
 
std::pair< FileHandle, FileHandlesocketpair (int family, int type, int protocol, std::error_code &ec) noexcept
 Create a pair of connected sockets.
 
std::pair< FileHandle, FileHandlesocketpair (int family, int type, int protocol)
 Create a pair of connected sockets.
 
template<typename ProtocolT >
std::pair< FileHandle, FileHandlesocketpair (ProtocolT protocol, std::error_code &ec) noexcept
 Create a pair of connected sockets.
 
template<typename ProtocolT >
std::pair< FileHandle, FileHandlesocketpair (ProtocolT protocol)
 Create a pair of connected sockets.
 
FileHandle accept (int sockfd, sockaddr &addr, socklen_t &addrlen, std::error_code &ec) noexcept
 Accept a connection on a socket.
 
FileHandle accept (int sockfd, sockaddr &addr, socklen_t &addrlen)
 Accept a connection on a socket.
 
FileHandle accept (int sockfd, std::error_code &ec) noexcept
 Accept a connection on a socket.
 
FileHandle accept (int sockfd)
 Accept a connection on a socket.
 
template<typename EndpointT >
FileHandle accept (int sockfd, EndpointT &ep, std::error_code &ec) noexcept
 Accept a connection on a socket.
 
template<typename EndpointT >
FileHandle accept (int sockfd, EndpointT &ep)
 Accept a connection on a socket.
 
void bind (int sockfd, const sockaddr &addr, socklen_t addrlen, std::error_code &ec) noexcept
 Bind a name to a socket.
 
void bind (int sockfd, const sockaddr &addr, socklen_t addrlen)
 Bind a name to a socket.
 
template<typename EndpointT >
void bind (int sockfd, const EndpointT &ep, std::error_code &ec) noexcept
 Bind a name to a socket.
 
template<typename EndpointT >
void bind (int sockfd, const EndpointT &ep)
 Bind a name to a socket.
 
void connect (int sockfd, const sockaddr &addr, socklen_t addrlen, std::error_code &ec) noexcept
 Initiate a connection on a socket.
 
void connect (int sockfd, const sockaddr &addr, socklen_t addrlen)
 Initiate a connection on a socket.
 
template<typename EndpointT >
void connect (int sockfd, const EndpointT &ep, std::error_code &ec) noexcept
 Initiate a connection on a socket.
 
template<typename EndpointT >
void connect (int sockfd, const EndpointT &ep)
 Initiate a connection on a socket.
 
void listen (int sockfd, int backlog, std::error_code &ec) noexcept
 Listen for connections on a socket.
 
void listen (int sockfd, int backlog)
 Listen for connections on a socket.
 
void shutdown (int sockfd, int how, std::error_code &ec) noexcept
 Shut-down part of a full-duplex connection.
 
void shutdown (int sockfd, int how)
 Shut-down part of a full-duplex connection.
 
ssize_t recv (int sockfd, void *buf, std::size_t len, int flags, std::error_code &ec) noexcept
 Receive a message from a socket.
 
std::size_t recv (int sockfd, void *buf, std::size_t len, int flags)
 Receive a message from a socket.
 
ssize_t recv (int sockfd, MutableBuffer buf, int flags, std::error_code &ec) noexcept
 Receive a message from a socket.
 
std::size_t recv (int sockfd, MutableBuffer buf, int flags)
 Receive a message from a socket.
 
ssize_t recvfrom (int sockfd, void *buf, std::size_t len, int flags, sockaddr &addr, socklen_t &addrlen, std::error_code &ec) noexcept
 Receive a message from a socket.
 
std::size_t recvfrom (int sockfd, void *buf, std::size_t len, int flags, sockaddr &addr, socklen_t &addrlen)
 Receive a message from a socket.
 
template<typename EndpointT >
ssize_t recvfrom (int sockfd, void *buf, std::size_t len, int flags, EndpointT &ep, std::error_code &ec) noexcept
 Receive a message from a socket.
 
template<typename EndpointT >
std::size_t recvfrom (int sockfd, void *buf, std::size_t len, int flags, EndpointT &ep)
 Receive a message from a socket.
 
template<typename EndpointT >
ssize_t recvfrom (int sockfd, MutableBuffer buf, int flags, EndpointT &ep, std::error_code &ec) noexcept
 Receive a message from a socket.
 
template<typename EndpointT >
std::size_t recvfrom (int sockfd, MutableBuffer buf, int flags, EndpointT &ep)
 Receive a message from a socket.
 
ssize_t send (int sockfd, const void *buf, std::size_t len, int flags, std::error_code &ec) noexcept
 Send a message on a socket.
 
std::size_t send (int sockfd, const void *buf, std::size_t len, int flags)
 Send a message on a socket.
 
ssize_t send (int sockfd, ConstBuffer buf, int flags, std::error_code &ec) noexcept
 Send a message on a socket.
 
std::size_t send (int sockfd, ConstBuffer buf, int flags)
 Send a message on a socket.
 
ssize_t sendto (int sockfd, const void *buf, std::size_t len, int flags, const sockaddr &addr, socklen_t addrlen, std::error_code &ec) noexcept
 Send a message on a socket.
 
std::size_t sendto (int sockfd, const void *buf, std::size_t len, int flags, const sockaddr &addr, socklen_t addrlen)
 Send a message on a socket.
 
template<typename EndpointT >
ssize_t sendto (int sockfd, const void *buf, std::size_t len, int flags, const EndpointT &ep, std::error_code &) noexcept
 Send a message on a socket.
 
template<typename EndpointT >
std::size_t sendto (int sockfd, const void *buf, std::size_t len, int flags, const EndpointT &ep)
 Send a message on a socket.
 
template<typename EndpointT >
ssize_t sendto (int sockfd, ConstBuffer buf, int flags, const EndpointT &ep, std::error_code &ec) noexcept
 Send a message on a socket.
 
template<typename EndpointT >
std::size_t sendto (int sockfd, ConstBuffer buf, int flags, const EndpointT &ep)
 Send a message on a socket.
 
void getsockname (int sockfd, sockaddr &addr, socklen_t &addrlen, std::error_code &ec) noexcept
 Get the socket name.
 
void getsockname (int sockfd, sockaddr &addr, socklen_t &addrlen)
 Get the socket name.
 
template<typename EndpointT >
void getsockname (int sockfd, EndpointT &ep, std::error_code &ec) noexcept
 Get the socket name.
 
template<typename EndpointT >
void getsockname (int sockfd, EndpointT &ep)
 Get the socket name.
 
void getsockopt (int sockfd, int level, int optname, void *optval, socklen_t &optlen, std::error_code &ec) noexcept
 Get socket option.
 
void getsockopt (int sockfd, int level, int optname, void *optval, socklen_t &optlen)
 Get socket option.
 
void setsockopt (int sockfd, int level, int optname, const void *optval, socklen_t optlen, std::error_code &ec) noexcept
 Set socket option.
 
void setsockopt (int sockfd, int level, int optname, const void *optval, socklen_t optlen)
 Set socket option.
 
void chdir (const char *path, std::error_code &ec) noexcept
 Change working directory.
 
void chdir (const char *path)
 Change working directory.
 
pid_t fork (std::error_code &ec) noexcept
 Create a child process.
 
pid_t fork ()
 Create a child process.
 
pid_t setsid (std::error_code &ec) noexcept
 Creates a session and sets the process group ID.
 
pid_t setsid ()
 Creates a session and sets the process group ID.
 

Function Documentation

◆ epoll_create() [1/2]

FileHandle toolbox::os::epoll_create ( int  size,
std::error_code &  ec 
)
inlinenoexcept

Open a new epoll instance. The size argument is ignored in kernels >= 2.6.8, but must be greater than zero.

Definition at line 30 of file Epoll.hpp.

Referenced by epoll_create(), and epoll_create().

◆ epoll_create() [2/2]

FileHandle toolbox::os::epoll_create ( int  size)
inline

Open a new epoll instance. The size argument is ignored in kernels >= 2.6.8, but must be greater than zero.

Definition at line 41 of file Epoll.hpp.

◆ epoll_create1() [1/2]

FileHandle toolbox::os::epoll_create1 ( int  flags,
std::error_code &  ec 
)
inlinenoexcept

Open a new epoll instance. If flags is zero, then epoll_create1() is the same as epoll_create().

Definition at line 51 of file Epoll.hpp.

Referenced by epoll_create1(), and epoll_create1().

◆ epoll_create1() [2/2]

FileHandle toolbox::os::epoll_create1 ( int  flags)
inline

Open a new epoll instance. If flags is zero, then epoll_create1() is the same as epoll_create().

Definition at line 61 of file Epoll.hpp.

◆ epoll_ctl() [1/2]

int toolbox::os::epoll_ctl ( int  epfd,
int  op,
int  fd,
epoll_event  event,
std::error_code &  ec 
)
inlinenoexcept

Control interface for an epoll file descriptor.

Definition at line 71 of file Epoll.hpp.

Referenced by toolbox::io::Epoll::add(), toolbox::io::Epoll::del(), epoll_ctl(), epoll_ctl(), toolbox::io::Epoll::mod(), and toolbox::io::Epoll::mod().

◆ epoll_ctl() [2/2]

void toolbox::os::epoll_ctl ( int  epfd,
int  op,
int  fd,
epoll_event  event 
)
inline

Control interface for an epoll file descriptor.

Definition at line 81 of file Epoll.hpp.

◆ epoll_wait() [1/2]

int toolbox::os::epoll_wait ( int  epfd,
epoll_event events,
int  maxevents,
int  timeout,
std::error_code &  ec 
)
inlinenoexcept

Wait for an I/O event on an epoll file descriptor.

Definition at line 90 of file Epoll.hpp.

Referenced by epoll_wait(), epoll_wait(), toolbox::io::Epoll::wait(), and toolbox::io::Epoll::wait().

◆ epoll_wait() [2/2]

int toolbox::os::epoll_wait ( int  epfd,
epoll_event events,
int  maxevents,
int  timeout 
)
inline

Wait for an I/O event on an epoll file descriptor.

Definition at line 101 of file Epoll.hpp.

◆ eventfd() [1/2]

FileHandle toolbox::os::eventfd ( unsigned  intval,
int  flags,
std::error_code &  ec 
)
inlinenoexcept

Create a file descriptor for event notification.

Definition at line 28 of file EventFd.hpp.

Referenced by eventfd(), and eventfd().

◆ eventfd() [2/2]

FileHandle toolbox::os::eventfd ( unsigned  intval,
int  flags 
)
inline

Create a file descriptor for event notification.

Definition at line 38 of file EventFd.hpp.

◆ open() [1/4]

FileHandle toolbox::os::open ( const char path,
int  flags,
mode_t  mode,
std::error_code &  ec 
)
inlinenoexcept

Open and possibly create a file.

Definition at line 32 of file File.hpp.

Referenced by open(), open(), open(), and open().

◆ open() [2/4]

FileHandle toolbox::os::open ( const char path,
int  flags,
mode_t  mode 
)
inline

Open and possibly create a file.

Definition at line 42 of file File.hpp.

◆ open() [3/4]

FileHandle toolbox::os::open ( const char path,
int  flags,
std::error_code &  ec 
)
inlinenoexcept

Open and possibly create a file.

Definition at line 52 of file File.hpp.

◆ open() [4/4]

FileHandle toolbox::os::open ( const char path,
int  flags 
)
inline

Open and possibly create a file.

Definition at line 62 of file File.hpp.

◆ remove() [1/2]

int toolbox::os::remove ( const char path)
inline

Definition at line 71 of file File.hpp.

Referenced by remove(), and remove().

◆ remove() [2/2]

int toolbox::os::remove ( const char path,
std::error_code &  ec 
)
inlinenoexcept

Definition at line 80 of file File.hpp.

◆ pipe2() [1/2]

std::pair< FileHandle, FileHandle > toolbox::os::pipe2 ( int  flags,
std::error_code &  ec 
)
inlinenoexcept

Create pipe.

Definition at line 90 of file File.hpp.

Referenced by pipe2(), and pipe2().

◆ pipe2() [2/2]

std::pair< FileHandle, FileHandle > toolbox::os::pipe2 ( int  flags)
inline

Create pipe.

Definition at line 100 of file File.hpp.

◆ fstat() [1/2]

void toolbox::os::fstat ( int  fd,
struct stat statbuf,
std::error_code &  ec 
)
inlinenoexcept

Get file status.

Definition at line 110 of file File.hpp.

Referenced by fstat(), and fstat().

◆ fstat() [2/2]

void toolbox::os::fstat ( int  fd,
struct stat statbuf 
)
inline

Get file status.

Definition at line 119 of file File.hpp.

◆ ftruncate() [1/2]

void toolbox::os::ftruncate ( int  fd,
off_t  length,
std::error_code &  ec 
)
inlinenoexcept

Truncate a file to a specified length.

Definition at line 128 of file File.hpp.

Referenced by ftruncate(), and ftruncate().

◆ ftruncate() [2/2]

void toolbox::os::ftruncate ( int  fd,
off_t  length 
)
inline

Truncate a file to a specified length.

Definition at line 137 of file File.hpp.

◆ read() [1/4]

ssize_t toolbox::os::read ( int  fd,
void buf,
std::size_t  len,
std::error_code &  ec 
)
inlinenoexcept

◆ read() [2/4]

std::size_t toolbox::os::read ( int  fd,
void buf,
std::size_t  len 
)
inline

Read from a file descriptor.

Definition at line 156 of file File.hpp.

◆ read() [3/4]

ssize_t toolbox::os::read ( int  fd,
MutableBuffer  buf,
std::error_code &  ec 
)
inlinenoexcept

Read from a file descriptor.

Definition at line 166 of file File.hpp.

◆ read() [4/4]

std::size_t toolbox::os::read ( int  fd,
MutableBuffer  buf 
)
inlinenoexcept

Read from a file descriptor.

Definition at line 172 of file File.hpp.

◆ write() [1/4]

ssize_t toolbox::os::write ( int  fd,
const void buf,
std::size_t  len,
std::error_code &  ec 
)
inlinenoexcept

◆ write() [2/4]

std::size_t toolbox::os::write ( int  fd,
const void buf,
std::size_t  len 
)
inline

Write to a file descriptor.

Definition at line 188 of file File.hpp.

◆ write() [3/4]

ssize_t toolbox::os::write ( int  fd,
ConstBuffer  buf,
std::error_code &  ec 
)
inlinenoexcept

Write to a file descriptor.

Definition at line 198 of file File.hpp.

◆ write() [4/4]

std::size_t toolbox::os::write ( int  fd,
ConstBuffer  buf 
)
inline

Write to a file descriptor.

Definition at line 204 of file File.hpp.

◆ fcntl() [1/4]

int toolbox::os::fcntl ( int  fd,
int  cmd,
std::error_code &  ec 
)
inlinenoexcept

File control.

Definition at line 210 of file File.hpp.

Referenced by fcntl(), fcntl(), fcntl(), and fcntl().

◆ fcntl() [2/4]

template<typename ArgT >
int toolbox::os::fcntl ( int  fd,
int  cmd,
ArgT  arg,
std::error_code &  ec 
)
inlinenoexcept

File control.

Definition at line 221 of file File.hpp.

◆ fcntl() [3/4]

int toolbox::os::fcntl ( int  fd,
int  cmd 
)
inline

File control.

Definition at line 231 of file File.hpp.

◆ fcntl() [4/4]

template<typename ArgT >
int toolbox::os::fcntl ( int  fd,
int  cmd,
ArgT  arg 
)
inline

File control.

Definition at line 242 of file File.hpp.

◆ timerfd_create() [1/2]

FileHandle toolbox::os::timerfd_create ( int  clock_id,
int  flags,
std::error_code &  ec 
)
inlinenoexcept

Create a file descriptor for timer notification.

Definition at line 29 of file TimerFd.hpp.

Referenced by timerfd_create(), and timerfd_create().

◆ timerfd_create() [2/2]

FileHandle toolbox::os::timerfd_create ( int  clock_id,
int  flags 
)
inline

Create a file descriptor for timer notification.

Definition at line 39 of file TimerFd.hpp.

◆ timerfd_settime() [1/8]

void toolbox::os::timerfd_settime ( int  fd,
int  flags,
const itimerspec new_value,
itimerspec old_value,
std::error_code &  ec 
)
inlinenoexcept

◆ timerfd_settime() [2/8]

void toolbox::os::timerfd_settime ( int  fd,
int  flags,
const itimerspec new_value,
itimerspec old_value 
)
inline

Arm or disarm timer.

Definition at line 59 of file TimerFd.hpp.

◆ timerfd_settime() [3/8]

void toolbox::os::timerfd_settime ( int  fd,
int  flags,
const itimerspec new_value,
std::error_code &  ec 
)
inlinenoexcept

Arm or disarm timer.

Definition at line 68 of file TimerFd.hpp.

◆ timerfd_settime() [4/8]

void toolbox::os::timerfd_settime ( int  fd,
int  flags,
const itimerspec new_value 
)
inline

Arm or disarm timer.

Definition at line 78 of file TimerFd.hpp.

◆ timerfd_settime() [5/8]

template<typename ClockT >
void toolbox::os::timerfd_settime ( int  fd,
int  flags,
std::chrono::time_point< ClockT, Duration expiry,
Duration  interval,
std::error_code &  ec 
)
inlinenoexcept

Arm or disarm timer.

Definition at line 88 of file TimerFd.hpp.

◆ timerfd_settime() [6/8]

template<typename ClockT >
void toolbox::os::timerfd_settime ( int  fd,
int  flags,
std::chrono::time_point< ClockT, Duration expiry,
Duration  interval 
)
inline

Arm or disarm timer.

Definition at line 97 of file TimerFd.hpp.

◆ timerfd_settime() [7/8]

template<typename ClockT >
void toolbox::os::timerfd_settime ( int  fd,
int  flags,
std::chrono::time_point< ClockT, Duration expiry,
std::error_code &  ec 
)
inlinenoexcept

Arm or disarm timer.

Definition at line 106 of file TimerFd.hpp.

◆ timerfd_settime() [8/8]

template<typename ClockT >
void toolbox::os::timerfd_settime ( int  fd,
int  flags,
std::chrono::time_point< ClockT, Duration expiry 
)
inline

Arm or disarm timer.

Definition at line 114 of file TimerFd.hpp.

◆ getaddrinfo() [1/6]

AddrInfoPtr toolbox::os::getaddrinfo ( const char node,
const char service,
const addrinfo hints,
std::error_code &  ec 
)
inlinenoexcept

Get network address from Internet host and service.

Definition at line 35 of file Socket.hpp.

Referenced by getaddrinfo(), getaddrinfo(), getaddrinfo(), getaddrinfo(), getaddrinfo(), and getaddrinfo().

◆ getaddrinfo() [2/6]

AddrInfoPtr toolbox::os::getaddrinfo ( const char node,
const char service,
const addrinfo hints 
)
inline

Get network address from Internet host and service.

Definition at line 47 of file Socket.hpp.

◆ getaddrinfo() [3/6]

AddrInfoPtr toolbox::os::getaddrinfo ( const char node,
const char service,
int  family,
int  type,
int  protocol,
std::error_code &  ec 
)
inlinenoexcept

Get network address from Internet host and service.

Definition at line 59 of file Socket.hpp.

◆ getaddrinfo() [4/6]

AddrInfoPtr toolbox::os::getaddrinfo ( const char node,
const char service,
int  family,
int  type,
int  protocol 
)
inline

Get network address from Internet host and service.

Definition at line 72 of file Socket.hpp.

◆ getaddrinfo() [5/6]

template<typename ProtocolT >
AddrInfoPtr toolbox::os::getaddrinfo ( const char node,
const char service,
ProtocolT  protocol,
std::error_code &  ec 
)
inlinenoexcept

Get network address from Internet host and service.

Definition at line 86 of file Socket.hpp.

◆ getaddrinfo() [6/6]

template<typename ProtocolT >
AddrInfoPtr toolbox::os::getaddrinfo ( const char node,
const char service,
ProtocolT  protocol 
)
inline

Get network address from Internet host and service.

Definition at line 94 of file Socket.hpp.

◆ if_nametoindex() [1/2]

unsigned toolbox::os::if_nametoindex ( const char ifname,
std::error_code &  ec 
)
inlinenoexcept

Returns the index of the network interface corresponding to the name ifname.

Definition at line 100 of file Socket.hpp.

Referenced by if_nametoindex(), and if_nametoindex().

◆ if_nametoindex() [2/2]

unsigned toolbox::os::if_nametoindex ( const char ifname)
inline

Returns the index of the network interface corresponding to the name ifname.

Definition at line 112 of file Socket.hpp.

◆ socket() [1/4]

FileHandle toolbox::os::socket ( int  family,
int  type,
int  protocol,
std::error_code &  ec 
)
inlinenoexcept

◆ socket() [2/4]

FileHandle toolbox::os::socket ( int  family,
int  type,
int  protocol 
)
inline

Create an endpoint for communication.

Definition at line 134 of file Socket.hpp.

◆ socket() [3/4]

template<typename ProtocolT >
FileHandle toolbox::os::socket ( ProtocolT  protocol,
std::error_code &  ec 
)
inlinenoexcept

Create an endpoint for communication.

Definition at line 145 of file Socket.hpp.

◆ socket() [4/4]

template<typename ProtocolT >
FileHandle toolbox::os::socket ( ProtocolT  protocol)
inline

Create an endpoint for communication.

Definition at line 152 of file Socket.hpp.

◆ socketpair() [1/4]

std::pair< FileHandle, FileHandle > toolbox::os::socketpair ( int  family,
int  type,
int  protocol,
std::error_code &  ec 
)
inlinenoexcept

Create a pair of connected sockets.

Definition at line 158 of file Socket.hpp.

Referenced by socketpair(), socketpair(), socketpair(), and socketpair().

◆ socketpair() [2/4]

std::pair< FileHandle, FileHandle > toolbox::os::socketpair ( int  family,
int  type,
int  protocol 
)
inline

Create a pair of connected sockets.

Definition at line 169 of file Socket.hpp.

◆ socketpair() [3/4]

template<typename ProtocolT >
std::pair< FileHandle, FileHandle > toolbox::os::socketpair ( ProtocolT  protocol,
std::error_code &  ec 
)
inlinenoexcept

Create a pair of connected sockets.

Definition at line 180 of file Socket.hpp.

◆ socketpair() [4/4]

template<typename ProtocolT >
std::pair< FileHandle, FileHandle > toolbox::os::socketpair ( ProtocolT  protocol)
inline

Create a pair of connected sockets.

Definition at line 188 of file Socket.hpp.

◆ accept() [1/6]

FileHandle toolbox::os::accept ( int  sockfd,
sockaddr addr,
socklen_t addrlen,
std::error_code &  ec 
)
inlinenoexcept

◆ accept() [2/6]

FileHandle toolbox::os::accept ( int  sockfd,
sockaddr addr,
socklen_t addrlen 
)
inline

Accept a connection on a socket.

Definition at line 207 of file Socket.hpp.

◆ accept() [3/6]

FileHandle toolbox::os::accept ( int  sockfd,
std::error_code &  ec 
)
inlinenoexcept

Accept a connection on a socket.

Definition at line 219 of file Socket.hpp.

◆ accept() [4/6]

FileHandle toolbox::os::accept ( int  sockfd)
inline

Accept a connection on a socket.

Definition at line 229 of file Socket.hpp.

◆ accept() [5/6]

template<typename EndpointT >
FileHandle toolbox::os::accept ( int  sockfd,
EndpointT ep,
std::error_code &  ec 
)
inlinenoexcept

Accept a connection on a socket.

Definition at line 240 of file Socket.hpp.

◆ accept() [6/6]

template<typename EndpointT >
FileHandle toolbox::os::accept ( int  sockfd,
EndpointT ep 
)
inline

Accept a connection on a socket.

Definition at line 252 of file Socket.hpp.

◆ bind() [1/4]

void toolbox::os::bind ( int  sockfd,
const sockaddr &  addr,
socklen_t  addrlen,
std::error_code &  ec 
)
inlinenoexcept

◆ bind() [2/4]

void toolbox::os::bind ( int  sockfd,
const sockaddr &  addr,
socklen_t  addrlen 
)
inline

Bind a name to a socket.

Definition at line 269 of file Socket.hpp.

◆ bind() [3/4]

template<typename EndpointT >
void toolbox::os::bind ( int  sockfd,
const EndpointT &  ep,
std::error_code &  ec 
)
inlinenoexcept

Bind a name to a socket.

Definition at line 278 of file Socket.hpp.

◆ bind() [4/4]

template<typename EndpointT >
void toolbox::os::bind ( int  sockfd,
const EndpointT &  ep 
)
inline

Bind a name to a socket.

Definition at line 285 of file Socket.hpp.

◆ connect() [1/4]

void toolbox::os::connect ( int  sockfd,
const sockaddr addr,
socklen_t  addrlen,
std::error_code &  ec 
)
inlinenoexcept

◆ connect() [2/4]

void toolbox::os::connect ( int  sockfd,
const sockaddr addr,
socklen_t  addrlen 
)
inline

Initiate a connection on a socket.

Definition at line 300 of file Socket.hpp.

◆ connect() [3/4]

template<typename EndpointT >
void toolbox::os::connect ( int  sockfd,
const EndpointT ep,
std::error_code &  ec 
)
inlinenoexcept

Initiate a connection on a socket.

Definition at line 309 of file Socket.hpp.

◆ connect() [4/4]

template<typename EndpointT >
void toolbox::os::connect ( int  sockfd,
const EndpointT ep 
)
inline

Initiate a connection on a socket.

Definition at line 316 of file Socket.hpp.

◆ listen() [1/2]

void toolbox::os::listen ( int  sockfd,
int  backlog,
std::error_code &  ec 
)
inlinenoexcept

Listen for connections on a socket.

Definition at line 322 of file Socket.hpp.

Referenced by BOOST_AUTO_TEST_CASE(), toolbox::net::StreamSockServ::listen(), toolbox::net::StreamSockServ::listen(), listen(), and listen().

◆ listen() [2/2]

void toolbox::os::listen ( int  sockfd,
int  backlog 
)
inline

Listen for connections on a socket.

Definition at line 330 of file Socket.hpp.

◆ shutdown() [1/2]

void toolbox::os::shutdown ( int  sockfd,
int  how,
std::error_code &  ec 
)
inlinenoexcept

Shut-down part of a full-duplex connection.

Definition at line 338 of file Socket.hpp.

Referenced by toolbox::net::IoSock::shutdown(), shutdown(), and shutdown().

◆ shutdown() [2/2]

void toolbox::os::shutdown ( int  sockfd,
int  how 
)
inline

Shut-down part of a full-duplex connection.

Definition at line 346 of file Socket.hpp.

◆ recv() [1/4]

ssize_t toolbox::os::recv ( int  sockfd,
void buf,
std::size_t  len,
int  flags,
std::error_code &  ec 
)
inlinenoexcept

◆ recv() [2/4]

std::size_t toolbox::os::recv ( int  sockfd,
void buf,
std::size_t  len,
int  flags 
)
inline

Receive a message from a socket.

Definition at line 364 of file Socket.hpp.

◆ recv() [3/4]

ssize_t toolbox::os::recv ( int  sockfd,
MutableBuffer  buf,
int  flags,
std::error_code &  ec 
)
inlinenoexcept

Receive a message from a socket.

Definition at line 374 of file Socket.hpp.

◆ recv() [4/4]

std::size_t toolbox::os::recv ( int  sockfd,
MutableBuffer  buf,
int  flags 
)
inline

Receive a message from a socket.

Definition at line 380 of file Socket.hpp.

◆ recvfrom() [1/6]

ssize_t toolbox::os::recvfrom ( int  sockfd,
void buf,
std::size_t  len,
int  flags,
sockaddr addr,
socklen_t addrlen,
std::error_code &  ec 
)
inlinenoexcept

◆ recvfrom() [2/6]

std::size_t toolbox::os::recvfrom ( int  sockfd,
void buf,
std::size_t  len,
int  flags,
sockaddr addr,
socklen_t addrlen 
)
inline

Receive a message from a socket.

Definition at line 399 of file Socket.hpp.

◆ recvfrom() [3/6]

template<typename EndpointT >
ssize_t toolbox::os::recvfrom ( int  sockfd,
void buf,
std::size_t  len,
int  flags,
EndpointT ep,
std::error_code &  ec 
)
inlinenoexcept

Receive a message from a socket.

Definition at line 413 of file Socket.hpp.

◆ recvfrom() [4/6]

template<typename EndpointT >
std::size_t toolbox::os::recvfrom ( int  sockfd,
void buf,
std::size_t  len,
int  flags,
EndpointT ep 
)
inline

Receive a message from a socket.

Definition at line 426 of file Socket.hpp.

◆ recvfrom() [5/6]

template<typename EndpointT >
ssize_t toolbox::os::recvfrom ( int  sockfd,
MutableBuffer  buf,
int  flags,
EndpointT ep,
std::error_code &  ec 
)
inlinenoexcept

Receive a message from a socket.

Definition at line 436 of file Socket.hpp.

◆ recvfrom() [6/6]

template<typename EndpointT >
std::size_t toolbox::os::recvfrom ( int  sockfd,
MutableBuffer  buf,
int  flags,
EndpointT ep 
)
inline

Receive a message from a socket.

Definition at line 444 of file Socket.hpp.

◆ send() [1/4]

ssize_t toolbox::os::send ( int  sockfd,
const void buf,
std::size_t  len,
int  flags,
std::error_code &  ec 
)
inlinenoexcept

◆ send() [2/4]

std::size_t toolbox::os::send ( int  sockfd,
const void buf,
std::size_t  len,
int  flags 
)
inline

Send a message on a socket.

Definition at line 461 of file Socket.hpp.

◆ send() [3/4]

ssize_t toolbox::os::send ( int  sockfd,
ConstBuffer  buf,
int  flags,
std::error_code &  ec 
)
inlinenoexcept

Send a message on a socket.

Definition at line 471 of file Socket.hpp.

◆ send() [4/4]

std::size_t toolbox::os::send ( int  sockfd,
ConstBuffer  buf,
int  flags 
)
inline

Send a message on a socket.

Definition at line 477 of file Socket.hpp.

◆ sendto() [1/6]

ssize_t toolbox::os::sendto ( int  sockfd,
const void buf,
std::size_t  len,
int  flags,
const sockaddr addr,
socklen_t  addrlen,
std::error_code &  ec 
)
inlinenoexcept

◆ sendto() [2/6]

std::size_t toolbox::os::sendto ( int  sockfd,
const void buf,
std::size_t  len,
int  flags,
const sockaddr addr,
socklen_t  addrlen 
)
inline

Send a message on a socket.

Definition at line 494 of file Socket.hpp.

◆ sendto() [3/6]

template<typename EndpointT >
ssize_t toolbox::os::sendto ( int  sockfd,
const void buf,
std::size_t  len,
int  flags,
const EndpointT ep,
std::error_code &   
)
inlinenoexcept

Send a message on a socket.

Definition at line 506 of file Socket.hpp.

◆ sendto() [4/6]

template<typename EndpointT >
std::size_t toolbox::os::sendto ( int  sockfd,
const void buf,
std::size_t  len,
int  flags,
const EndpointT ep 
)
inline

Send a message on a socket.

Definition at line 514 of file Socket.hpp.

◆ sendto() [5/6]

template<typename EndpointT >
ssize_t toolbox::os::sendto ( int  sockfd,
ConstBuffer  buf,
int  flags,
const EndpointT ep,
std::error_code &  ec 
)
inlinenoexcept

Send a message on a socket.

Definition at line 522 of file Socket.hpp.

◆ sendto() [6/6]

template<typename EndpointT >
std::size_t toolbox::os::sendto ( int  sockfd,
ConstBuffer  buf,
int  flags,
const EndpointT ep 
)
inline

Send a message on a socket.

Definition at line 531 of file Socket.hpp.

◆ getsockname() [1/4]

void toolbox::os::getsockname ( int  sockfd,
sockaddr addr,
socklen_t addrlen,
std::error_code &  ec 
)
inlinenoexcept

◆ getsockname() [2/4]

void toolbox::os::getsockname ( int  sockfd,
sockaddr addr,
socklen_t addrlen 
)
inline

Get the socket name.

Definition at line 549 of file Socket.hpp.

◆ getsockname() [3/4]

template<typename EndpointT >
void toolbox::os::getsockname ( int  sockfd,
EndpointT ep,
std::error_code &  ec 
)
inlinenoexcept

Get the socket name.

Definition at line 560 of file Socket.hpp.

◆ getsockname() [4/4]

template<typename EndpointT >
void toolbox::os::getsockname ( int  sockfd,
EndpointT ep 
)
inline

Get the socket name.

Definition at line 571 of file Socket.hpp.

◆ getsockopt() [1/2]

void toolbox::os::getsockopt ( int  sockfd,
int  level,
int  optname,
void optval,
socklen_t optlen,
std::error_code &  ec 
)
inlinenoexcept

Get socket option.

Definition at line 579 of file Socket.hpp.

Referenced by getsockopt(), and getsockopt().

◆ getsockopt() [2/2]

void toolbox::os::getsockopt ( int  sockfd,
int  level,
int  optname,
void optval,
socklen_t optlen 
)
inline

Get socket option.

Definition at line 588 of file Socket.hpp.

◆ setsockopt() [1/2]

void toolbox::os::setsockopt ( int  sockfd,
int  level,
int  optname,
const void optval,
socklen_t  optlen,
std::error_code &  ec 
)
inlinenoexcept

Set socket option.

Definition at line 596 of file Socket.hpp.

Referenced by setsockopt(), and setsockopt().

◆ setsockopt() [2/2]

void toolbox::os::setsockopt ( int  sockfd,
int  level,
int  optname,
const void optval,
socklen_t  optlen 
)
inline

Set socket option.

Definition at line 605 of file Socket.hpp.

◆ chdir() [1/2]

void toolbox::os::chdir ( const char path,
std::error_code &  ec 
)
inlinenoexcept

Change working directory.

Definition at line 28 of file System.hpp.

Referenced by chdir(), and chdir().

◆ chdir() [2/2]

void toolbox::os::chdir ( const char path)
inline

Change working directory.

Definition at line 37 of file System.hpp.

◆ fork() [1/2]

pid_t toolbox::os::fork ( std::error_code &  ec)
inlinenoexcept

Create a child process.

Definition at line 46 of file System.hpp.

◆ fork() [2/2]

pid_t toolbox::os::fork ( )
inline

Create a child process.

Definition at line 56 of file System.hpp.

Referenced by fork(), and fork().

◆ setsid() [1/2]

pid_t toolbox::os::setsid ( std::error_code &  ec)
inlinenoexcept

Creates a session and sets the process group ID.

Definition at line 66 of file System.hpp.

◆ setsid() [2/2]

pid_t toolbox::os::setsid ( )
inline

Creates a session and sets the process group ID.

Definition at line 76 of file System.hpp.

Referenced by setsid(), and setsid().