uvcc
libuv C++ bindings
uv Namespace Reference

Namespace for all uvcc definitions. More...

Classes

struct  adopt_ref_t
 The type of the adopt_ref constant. More...
 
class  aligned_storage
 A wrapper around std::aligned_storage< _LEN_, _ALIGN_ >::type that simplifies initializing the provided storage space, getting from it, setting it to, and automatic destroying it from objects of any type fitting to the given size and alignment requirements. More...
 
class  any_ptr
 The analogue of std::unique_ptr that managed object type is not defined at compile time and can be varied. More...
 
class  async
 Async handle. More...
 
class  buffer
 Encapsulates uv_buf_t data type and provides uv_buf_t[] functionality. More...
 
class  check
 Check handle. More...
 
class  connect
 Stream connect request type. More...
 
struct  default_delete
 The analogue of the std::default_delete. More...
 
struct  default_destroy
 The analogue of the uv::default_delete but for the type destructor only. More...
 
class  file
 The open file handle. More...
 
class  fs
 The base calss for filesystem requests. More...
 
class  fs_event
 FS Event handle. More...
 
class  getaddrinfo
 Getaddrinfo request type. More...
 
class  getnameinfo
 Getnameinfo request type. More...
 
class  handle
 The base class for the libuv handles. More...
 
class  idle
 Idle handle. More...
 
class  io
 The base class for handles representing I/O endpoints: a file, TCP/UDP socket, pipe, TTY. More...
 
struct  is_convertible_to_one_of
 Checks if a type _T_ is convertible to one of the types from the type list _Ts_. More...
 
struct  is_one_of
 Checks if a type _T_ belongs to a type list _Ts_. More...
 
class  loop
 The I/O event loop class. More...
 
class  mutex
 
class  output
 Generic write/send request type for I/O endpoints (files, TCP/UDP sockets, pipes, TTYs). More...
 
class  pipe
 Pipe handle. More...
 
class  poll
 Poll handle. More...
 
class  prepare
 Prepare handle. More...
 
class  process
 Process handle. More...
 
class  ref_count
 A reference counter with atomic increment/decrement. More...
 
class  ref_guard
 A scoped reference counting guard. More...
 
class  request
 The base class for the libuv requests. More...
 
class  shutdown
 Stream shutdown request type. More...
 
class  signal
 Signal handle. More...
 
class  spinlock
 A simple spinlock mutex built around std::atomic_flag. More...
 
class  stream
 Stream handle. More...
 
class  tcp
 TCP handle. More...
 
class  timer
 Timer handle. More...
 
class  tty
 TTY handle. More...
 
struct  type_at
 Provides a typedef member type equal to the type from the type list _Ts_ at index _index_. The index should start from 1 up to sizeof...(_Ts_). More...
 
class  type_storage
 A wrapper providing the feature of being a standard layout type for the given type _T_. More...
 
class  udp
 UDP handle. More...
 
class  udp_send
 UDP send request type. More...
 
class  union_storage
 A tagged union that provide a storage space being a standard layout type suited for all its type variants specified in the type list _Ts_. More...
 
struct  uv_handle_traits< uv_async_t >
 
struct  uv_handle_traits< uv_check_t >
 
struct  uv_handle_traits< uv_fs_event_t >
 
struct  uv_handle_traits< uv_fs_poll_t >
 
struct  uv_handle_traits< uv_handle_t >
 
struct  uv_handle_traits< uv_idle_t >
 
struct  uv_handle_traits< uv_pipe_t >
 
struct  uv_handle_traits< uv_poll_t >
 
struct  uv_handle_traits< uv_prepare_t >
 
struct  uv_handle_traits< uv_process_t >
 
struct  uv_handle_traits< uv_signal_t >
 
struct  uv_handle_traits< uv_stream_t >
 
struct  uv_handle_traits< uv_tcp_t >
 
struct  uv_handle_traits< uv_timer_t >
 
struct  uv_handle_traits< uv_tty_t >
 
struct  uv_handle_traits< uv_udp_t >
 
struct  uv_req_traits< uv_connect_t >
 
struct  uv_req_traits< uv_fs_t >
 
struct  uv_req_traits< uv_getaddrinfo_t >
 
struct  uv_req_traits< uv_getnameinfo_t >
 
struct  uv_req_traits< uv_req_t >
 
struct  uv_req_traits< uv_shutdown_t >
 
struct  uv_req_traits< uv_udp_send_t >
 
struct  uv_req_traits< uv_work_t >
 
struct  uv_req_traits< uv_write_t >
 
class  work
 Work scheduling request type. More...
 
class  write
 Stream write request type. More...
 

Typedefs

using on_buffer_alloc_t = std::function< buffer(handle _handle, std::size_t _suggested_size) >
 The function type of the callback called by io::read_start() and udp::recv_start()... More...
 
template<typename... _Ts_>
using aligned_union = std::aligned_storage< greatest(sizeof(_Ts_)...), greatest(alignof(_Ts_)...) >
 A mimic of STL's std::aligned_union missed in gcc 4.9.2.
 

Functions

template<typename _I_ >
uint16_t hton16 (const _I_ &_i)
 Cross-platform htons()
 
template<typename _I_ >
uint32_t hton32 (const _I_ &_i)
 Cross-platform htonl()
 
template<typename _I_ >
uint64_t hton64 (const _I_ &_i)
 Cross-platform htonll()
 
template<typename _I_ >
uint16_t ntoh16 (const _I_ &_i)
 Cross-platform ntohs()
 
template<typename _I_ >
uint32_t ntoh32 (const _I_ &_i)
 Cross-platform ntohl()
 
template<typename _I_ >
uint64_t ntoh64 (const _I_ &_i)
 Cross-platform ntohll()
 
template<typename _T_ , typename... _Ts_>
constexpr auto greatest (_T_ &&_v, _Ts_ &&... _vs) -> std::common_type_t< decltype(_v), decltype(_vs)... >
 Intended to be used instead of constexpr T max(std::initializer_list<T>)... More...
 
template<typename _T_ , typename... _Ts_>
constexpr auto lowest (_T_ &&_v, _Ts_ &&... _vs) -> std::common_type_t< decltype(_v), decltype(_vs)... >
 The counterpart of greatest()
 
template<typename _T_ , typename... _Ts_>
constexpr auto sum (_T_ &&_v, _Ts_ &&... _vs) -> std::common_type_t< _T_, _Ts_... >
 Primarily intended for summation of values from parameter packs if fold expressions are not supported.
 
sockaddr_in
int init (::sockaddr_in &_sin)
 Initialize a sockaddr_in structure.
 
int init (::sockaddr_in &_sin, const char *_ip, const char *_port=nullptr)
 Initialize a sockaddr_in structure from strings containing an IPv4 address and (optionally) a port. More...
 
sockaddr_in6
int init (::sockaddr_in6 &_sin6)
 Initialize a sockaddr_in6 structure.
 
int init (::sockaddr_in6 &_sin6, const char *_ip, const char *_port=nullptr)
 Initialize a sockaddr_in6 structure from strings containing an IPv6 address and (optionally) a port. More...
 
sockaddr_storage
int init (::sockaddr_storage &_ss, decltype(::sockaddr::sa_family) _family=AF_UNSPEC)
 
int init (::sockaddr_storage &_ss, const ::sockaddr &_sa)
 
int init (::sockaddr_storage &_ss, const char *_ip, const char *_port=nullptr)
 
addrinfo
int init (::addrinfo &_ai, decltype(::addrinfo::ai_family) _family=AF_UNSPEC, decltype(::addrinfo::ai_socktype) _socktype=0, decltype(::addrinfo::ai_flags) _flags=AI_ADDRCONFIG)
 Initialize an addrinfo structure for to be used as a hints argument in uv::getaddrinfo request. More...
 

Variables

constexpr const adopt_ref_t adopt_ref
 The tag to be used to prevent ref_guard constructor from increasing reference count of the protected object.
 

Detailed Description

Namespace for all uvcc definitions.