WPILibC++ 2023.4.3-108-ge5452e3
|
Classes | |
class | Async |
Async handle. More... | |
class | Async<> |
Async specialization for no data parameters. More... | |
class | AsyncFunction |
class | AsyncFunction< R(T...)> |
Function async handle. More... | |
class | Buffer |
Data buffer. More... | |
class | Check |
Check handle. More... | |
class | ConnectReq |
Connection request. More... | |
class | Error |
Error code. More... | |
class | FsEvent |
Filesystem Event handle. More... | |
class | GetAddrInfoReq |
GetAddrInfo request. More... | |
class | GetNameInfoReq |
GetNameInfo request. More... | |
class | Handle |
Handle. More... | |
class | HandleImpl |
Handle. More... | |
class | Idle |
Idle handle. More... | |
class | Loop |
Event loop. More... | |
class | NetworkStream |
Network stream handle. More... | |
class | NetworkStreamImpl |
class | Pipe |
Pipe handle. More... | |
class | PipeConnectReq |
Pipe connection request. More... | |
class | Poll |
Poll handle. More... | |
class | Prepare |
Prepare handle. More... | |
class | Process |
Process handle. More... | |
class | Request |
Request. More... | |
class | RequestImpl |
Request. More... | |
class | ShutdownReq |
Shutdown request. More... | |
class | Signal |
Signal handle. More... | |
class | SimpleBufferPool |
A simple pool allocator for Buffers. More... | |
class | Stream |
Stream handle. More... | |
class | StreamImpl |
class | Tcp |
TCP handle. More... | |
class | TcpConnectReq |
TCP connection request. More... | |
class | Timer |
Timer handle. More... | |
class | Tty |
TTY handle. More... | |
class | Udp |
UDP handle. More... | |
class | UdpSendReq |
UDP send request. More... | |
class | WorkReq |
Work request. More... | |
class | WriteReq |
Write request. More... | |
Functions | |
template<typename T > | |
int | AddrToName (const sockaddr_in &addr, T *ip, unsigned int *port) |
Convert a binary structure containing an IPv4 address to a string. More... | |
template<typename T > | |
int | AddrToName (const sockaddr_in6 &addr, T *ip, unsigned int *port) |
Convert a binary structure containing an IPv6 address to a string. More... | |
template<typename T > | |
int | AddrToName (const sockaddr_storage &addr, T *ip, unsigned int *port) |
Convert a binary structure containing an IPv4 or IPv6 address to a string. More... | |
template<typename T > | |
int | AddrToName (const in_addr &addr, T *ip) |
Convert a binary IPv4 address to a string. More... | |
template<typename T > | |
int | AddrToName (const in6_addr &addr, T *ip) |
Convert a binary IPv6 address to a string. More... | |
int | NameToAddr (std::string_view ip, unsigned int port, sockaddr_in *addr) |
Convert a string containing an IPv4 address to a binary structure. More... | |
int | NameToAddr (std::string_view ip, unsigned int port, sockaddr_in6 *addr) |
Convert a string containing an IPv6 address to a binary structure. More... | |
int | NameToAddr (std::string_view ip, in_addr *addr) |
Convert a string containing an IPv4 address to binary format. More... | |
int | NameToAddr (std::string_view ip, in6_addr *addr) |
Convert a string containing an IPv6 address to binary format. More... | |
void | GetNameInfo (Loop &loop, const std::shared_ptr< GetNameInfoReq > &req, const sockaddr &addr, int flags=0) |
Asynchronous getnameinfo(3). More... | |
void | GetNameInfo (const std::shared_ptr< Loop > &loop, const std::shared_ptr< GetNameInfoReq > &req, const sockaddr &addr, int flags=0) |
Asynchronous getnameinfo(3). More... | |
void | GetNameInfo (Loop &loop, std::function< void(const char *, const char *)> callback, const sockaddr &addr, int flags=0) |
Asynchronous getnameinfo(3). More... | |
void | GetNameInfo (const std::shared_ptr< Loop > &loop, std::function< void(const char *, const char *)> callback, const sockaddr &addr, int flags=0) |
Asynchronous getnameinfo(3). More... | |
void | GetNameInfo4 (Loop &loop, const std::shared_ptr< GetNameInfoReq > &req, std::string_view ip, unsigned int port, int flags=0) |
Asynchronous IPv4 getnameinfo(3). More... | |
void | GetNameInfo4 (const std::shared_ptr< Loop > &loop, const std::shared_ptr< GetNameInfoReq > &req, std::string_view ip, unsigned int port, int flags=0) |
Asynchronous IPv4 getnameinfo(3). More... | |
void | GetNameInfo4 (Loop &loop, std::function< void(const char *, const char *)> callback, std::string_view ip, unsigned int port, int flags=0) |
Asynchronous IPv4 getnameinfo(3). More... | |
void | GetNameInfo4 (const std::shared_ptr< Loop > &loop, std::function< void(const char *, const char *)> callback, std::string_view ip, unsigned int port, int flags=0) |
Asynchronous IPv4 getnameinfo(3). More... | |
void | GetNameInfo6 (Loop &loop, const std::shared_ptr< GetNameInfoReq > &req, std::string_view ip, unsigned int port, int flags=0) |
Asynchronous IPv6 getnameinfo(3). More... | |
void | GetNameInfo6 (const std::shared_ptr< Loop > &loop, const std::shared_ptr< GetNameInfoReq > &req, std::string_view ip, unsigned int port, int flags=0) |
Asynchronous IPv6 getnameinfo(3). More... | |
void | GetNameInfo6 (Loop &loop, std::function< void(const char *, const char *)> callback, std::string_view ip, unsigned int port, int flags=0) |
Asynchronous IPv6 getnameinfo(3). More... | |
void | GetNameInfo6 (const std::shared_ptr< Loop > &loop, std::function< void(const char *, const char *)> callback, std::string_view ip, unsigned int port, int flags=0) |
Asynchronous IPv6 getnameinfo(3). More... | |
void | QueueWork (Loop &loop, const std::shared_ptr< WorkReq > &req) |
Initializes a work request which will run on the thread pool. More... | |
void | QueueWork (const std::shared_ptr< Loop > &loop, const std::shared_ptr< WorkReq > &req) |
Initializes a work request which will run on the thread pool. More... | |
void | QueueWork (Loop &loop, std::function< void()> work, std::function< void()> afterWork) |
Initializes a work request which will run on the thread pool. More... | |
void | QueueWork (const std::shared_ptr< Loop > &loop, std::function< void()> work, std::function< void()> afterWork) |
Initializes a work request which will run on the thread pool. More... | |
void | GetAddrInfo (Loop &loop, const std::shared_ptr< GetAddrInfoReq > &req, std::string_view node, std::string_view service={}, const addrinfo *hints=nullptr) |
Asynchronous getaddrinfo(3). More... | |
void | GetAddrInfo (const std::shared_ptr< Loop > &loop, const std::shared_ptr< GetAddrInfoReq > &req, std::string_view node, std::string_view service={}, const addrinfo *hints=nullptr) |
Asynchronous getaddrinfo(3). More... | |
void | GetAddrInfo (Loop &loop, std::function< void(const addrinfo &)> callback, std::string_view node, std::string_view service={}, const addrinfo *hints=nullptr) |
Asynchronous getaddrinfo(3). More... | |
void | GetAddrInfo (const std::shared_ptr< Loop > &loop, std::function< void(const addrinfo &)> callback, std::string_view node, std::string_view service={}, const addrinfo *hints=nullptr) |
Asynchronous getaddrinfo(3). More... | |
int wpi::uv::AddrToName | ( | const in6_addr & | addr, |
T * | ip | ||
) |
Convert a binary IPv6 address to a string.
addr | Binary address |
ip | Output string (any type that has assign(char*, char*) ) |
uv_inet_ntop()
). int wpi::uv::AddrToName | ( | const in_addr & | addr, |
T * | ip | ||
) |
Convert a binary IPv4 address to a string.
addr | Binary address |
ip | Output string (any type that has assign(char*, char*) ) |
uv_inet_ntop()
). int wpi::uv::AddrToName | ( | const sockaddr_in & | addr, |
T * | ip, | ||
unsigned int * | port | ||
) |
Convert a binary structure containing an IPv4 address to a string.
addr | Binary structure |
ip | Output string (any type that has assign(char*, char*) ) |
port | Output port number |
uv_ip4_name()
). int wpi::uv::AddrToName | ( | const sockaddr_in6 & | addr, |
T * | ip, | ||
unsigned int * | port | ||
) |
Convert a binary structure containing an IPv6 address to a string.
addr | Binary structure |
ip | Output string (any type that has assign(char*, char*) ) |
port | Output port number |
uv_ip6_name()
). int wpi::uv::AddrToName | ( | const sockaddr_storage & | addr, |
T * | ip, | ||
unsigned int * | port | ||
) |
Convert a binary structure containing an IPv4 or IPv6 address to a string.
addr | Binary structure |
ip | Output string (any type that has assign(char*, char*) ) |
port | Output port number |
uv_ip6_name()
).
|
inline |
Asynchronous getaddrinfo(3).
HandleResolvedAddress() is called on the request when the resolution completes. HandleError() is called on the request if any errors occur.
Either node or service may be empty but not both.
loop | Event loop |
req | request |
node | Either a numerical network address or a network hostname. |
service | Either a service name or a port number as a string. |
hints | Optional addrinfo data structure with additional address type constraints. |
|
inline |
Asynchronous getaddrinfo(3).
The callback is called when the resolution completes, and errors are forwarded to the loop. This is a convenience wrapper.
Either node or service may be empty but not both.
loop | Event loop |
callback | Callback function to call when resolution completes |
node | Either a numerical network address or a network hostname. |
service | Either a service name or a port number as a string. |
hints | Optional addrinfo data structure with additional address type constraints. |
void wpi::uv::GetAddrInfo | ( | Loop & | loop, |
const std::shared_ptr< GetAddrInfoReq > & | req, | ||
std::string_view | node, | ||
std::string_view | service = {} , |
||
const addrinfo * | hints = nullptr |
||
) |
Asynchronous getaddrinfo(3).
HandleResolvedAddress() is called on the request when the resolution completes. HandleError() is called on the request if any errors occur.
Either node or service may be empty but not both.
loop | Event loop |
req | request |
node | Either a numerical network address or a network hostname. |
service | Either a service name or a port number as a string. |
hints | Optional addrinfo data structure with additional address type constraints. |
void wpi::uv::GetAddrInfo | ( | Loop & | loop, |
std::function< void(const addrinfo &)> | callback, | ||
std::string_view | node, | ||
std::string_view | service = {} , |
||
const addrinfo * | hints = nullptr |
||
) |
Asynchronous getaddrinfo(3).
The callback is called when the resolution completes, and errors are forwarded to the loop. This is a convenience wrapper.
Either node or service may be empty but not both.
loop | Event loop |
callback | Callback function to call when resolution completes |
node | Either a numerical network address or a network hostname. |
service | Either a service name or a port number as a string. |
hints | Optional addrinfo data structure with additional address type constraints. |
|
inline |
Asynchronous getnameinfo(3).
HandleResolvedName() is called on the request when the resolution completes. HandleError() is called on the request if any errors occur.
loop | Event loop |
req | request |
addr | Initialized sockaddr_in or sockaddr_in6 data structure. |
flags | Optional flags to modify the behavior of getnameinfo . |
|
inline |
Asynchronous getnameinfo(3).
The callback is called when the resolution completes, and errors are forwarded to the loop.
loop | Event loop |
callback | Callback function to call when resolution completes |
addr | Initialized sockaddr_in or sockaddr_in6 data structure. |
flags | Optional flags to modify the behavior of getnameinfo . |
void wpi::uv::GetNameInfo | ( | Loop & | loop, |
const std::shared_ptr< GetNameInfoReq > & | req, | ||
const sockaddr & | addr, | ||
int | flags = 0 |
||
) |
Asynchronous getnameinfo(3).
HandleResolvedName() is called on the request when the resolution completes. HandleError() is called on the request if any errors occur.
loop | Event loop |
req | request |
addr | Initialized sockaddr_in or sockaddr_in6 data structure. |
flags | Optional flags to modify the behavior of getnameinfo . |
void wpi::uv::GetNameInfo | ( | Loop & | loop, |
std::function< void(const char *, const char *)> | callback, | ||
const sockaddr & | addr, | ||
int | flags = 0 |
||
) |
Asynchronous getnameinfo(3).
The callback is called when the resolution completes, and errors are forwarded to the loop.
loop | Event loop |
callback | Callback function to call when resolution completes |
addr | Initialized sockaddr_in or sockaddr_in6 data structure. |
flags | Optional flags to modify the behavior of getnameinfo . |
|
inline |
Asynchronous IPv4 getnameinfo(3).
HandleResolvedName() is called on the request when the resolution completes. HandleError() is called on the request if any errors occur.
loop | Event loop |
req | request |
ip | A valid IPv4 address |
port | A valid port number |
flags | Optional flags to modify the behavior of getnameinfo . |
|
inline |
Asynchronous IPv4 getnameinfo(3).
The callback is called when the resolution completes, and errors are forwarded to the loop. This is a convenience wrapper.
loop | Event loop |
ip | A valid IPv4 address |
port | A valid port number |
callback | Callback function to call when resolution completes |
flags | Optional flags to modify the behavior of getnameinfo . |
void wpi::uv::GetNameInfo4 | ( | Loop & | loop, |
const std::shared_ptr< GetNameInfoReq > & | req, | ||
std::string_view | ip, | ||
unsigned int | port, | ||
int | flags = 0 |
||
) |
Asynchronous IPv4 getnameinfo(3).
HandleResolvedName() is called on the request when the resolution completes. HandleError() is called on the request if any errors occur.
loop | Event loop |
req | request |
ip | A valid IPv4 address |
port | A valid port number |
flags | Optional flags to modify the behavior of getnameinfo . |
void wpi::uv::GetNameInfo4 | ( | Loop & | loop, |
std::function< void(const char *, const char *)> | callback, | ||
std::string_view | ip, | ||
unsigned int | port, | ||
int | flags = 0 |
||
) |
Asynchronous IPv4 getnameinfo(3).
The callback is called when the resolution completes, and errors are forwarded to the loop.
loop | Event loop |
callback | Callback function to call when resolution completes |
ip | A valid IPv4 address |
port | A valid port number |
flags | Optional flags to modify the behavior of getnameinfo . |
|
inline |
Asynchronous IPv6 getnameinfo(3).
HandleResolvedName() is called on the request when the resolution completes. HandleError() is called on the request if any errors occur.
loop | Event loop |
req | request |
ip | A valid IPv6 address |
port | A valid port number |
flags | Optional flags to modify the behavior of getnameinfo . |
|
inline |
Asynchronous IPv6 getnameinfo(3).
The callback is called when the resolution completes, and errors are forwarded to the loop. This is a convenience wrapper.
loop | Event loop |
callback | Callback function to call when resolution completes |
ip | A valid IPv6 address |
port | A valid port number |
flags | Optional flags to modify the behavior of getnameinfo . |
void wpi::uv::GetNameInfo6 | ( | Loop & | loop, |
const std::shared_ptr< GetNameInfoReq > & | req, | ||
std::string_view | ip, | ||
unsigned int | port, | ||
int | flags = 0 |
||
) |
Asynchronous IPv6 getnameinfo(3).
HandleResolvedName() is called on the request when the resolution completes. HandleError() is called on the request if any errors occur.
loop | Event loop |
req | request |
ip | A valid IPv6 address |
port | A valid port number |
flags | Optional flags to modify the behavior of getnameinfo . |
void wpi::uv::GetNameInfo6 | ( | Loop & | loop, |
std::function< void(const char *, const char *)> | callback, | ||
std::string_view | ip, | ||
unsigned int | port, | ||
int | flags = 0 |
||
) |
Asynchronous IPv6 getnameinfo(3).
The callback is called when the resolution completes, and errors are forwarded to the loop. This is a convenience wrapper.
loop | Event loop |
callback | Callback function to call when resolution completes |
ip | A valid IPv6 address |
port | A valid port number |
flags | Optional flags to modify the behavior of getnameinfo . |
int wpi::uv::NameToAddr | ( | std::string_view | ip, |
in6_addr * | addr | ||
) |
Convert a string containing an IPv6 address to binary format.
ip | IPv6 address string |
addr | Output binary |
uv_inet_pton()
). int wpi::uv::NameToAddr | ( | std::string_view | ip, |
in_addr * | addr | ||
) |
Convert a string containing an IPv4 address to binary format.
ip | IPv4 address string |
addr | Output binary |
uv_inet_pton()
). int wpi::uv::NameToAddr | ( | std::string_view | ip, |
unsigned int | port, | ||
sockaddr_in * | addr | ||
) |
Convert a string containing an IPv4 address to a binary structure.
ip | IPv4 address string |
port | Port number |
addr | Output binary structure |
uv_ip4_addr()
). int wpi::uv::NameToAddr | ( | std::string_view | ip, |
unsigned int | port, | ||
sockaddr_in6 * | addr | ||
) |
Convert a string containing an IPv6 address to a binary structure.
ip | IPv6 address string |
port | Port number |
addr | Output binary structure |
uv_ip6_addr()
).
|
inline |
Initializes a work request which will run on the thread pool.
loop | Event loop |
req | request |
|
inline |
Initializes a work request which will run on the thread pool.
The work callback will be run on a thread from the thread pool, and the afterWork callback will be called on the loop thread after the work completes. Any errors are forwarded to the loop.
loop | Event loop |
work | Work callback (called from separate thread) |
afterWork | After work callback (called on loop thread) |
Initializes a work request which will run on the thread pool.
loop | Event loop |
req | request |
void wpi::uv::QueueWork | ( | Loop & | loop, |
std::function< void()> | work, | ||
std::function< void()> | afterWork | ||
) |
Initializes a work request which will run on the thread pool.
The work callback will be run on a thread from the thread pool, and the afterWork callback will be called on the loop thread after the work completes. Any errors are forwarded to the loop.
loop | Event loop |
work | Work callback (called from separate thread) |
afterWork | After work callback (called on loop thread) |