Classes | |
| class | CANRawSocket |
| Raw CAN socket class. More... | |
| class | CANSocket |
| CAN socket class. More... | |
| class | EventHandler |
| class | InternetSocket |
| Internet socket class. More... | |
| struct | NetworkAddressInfo |
| class | NetworkInterface |
| class | SCTPSocket |
| SCTP socket class. More... | |
| class | SocketException |
| Signals a problem with the execution of a socket call. More... | |
| struct | IOResult |
| class | SimpleSocket |
| A socket representing a basic communication endpoint. More... | |
| class | TCPSocket |
| TCP socket class. More... | |
| class | UDPSocket |
| UDP socket class. More... | |
| class | UnixDatagramSocket |
| Unix datagram socket class. More... | |
| class | UnixSeqPacketSocket |
| Unix domain sequential packet (SOCK_SEQPACKET) socket class. More... | |
| class | UnixSocket |
| Unix domain socket class. More... | |
| class | UnixStreamSocket |
| Unix domain stream socket class. More... | |
Enumerations | |
| enum | AddressFamily { IPv4 , IPv6 } |
| used by internet socket types More... | |
| enum class | IOStatus { Success , WouldBlock , Timeout , PeerDisconnected , DestinationUnavailable } |
| status of the I/O operation More... | |
| enum class | ConnectResult { Connected , InProgress , Timeout , Refused , Aborted , Unreachable } |
| result of the connection attempt More... | |
| enum | ShutdownDirection { STOP_RECEIVE , STOP_SEND , STOP_BOTH } |
| direction to close for a stream socket More... | |
Functions | |
| std::vector< NetworkAddressInfo > | getNetworkAddresses () |
| Return IPv4/IPv6 address entries for the local network interfaces. | |
| std::vector< NetworkInterface > | getNetworkInterfaces () |
| Returns list of all network interfaces regardless of their state. | |
| std::string | resolveHostname (const std::string &hostname) |
| uint16_t | resolveService (const std::string &service, const std::string &protocol="tcp") |
| enum NET::AddressFamily |
|
nodiscardstrong |
result of the connection attempt
Definition at line 93 of file SimpleSocket.h.
|
nodiscardstrong |
status of the I/O operation
| Enumerator | |
|---|---|
| Success | |
| WouldBlock | |
| Timeout | |
| PeerDisconnected | |
| DestinationUnavailable | |
Definition at line 55 of file SimpleSocket.h.
direction to close for a stream socket
Definition at line 104 of file SimpleSocket.h.
| std::vector< NetworkAddressInfo > NET::getNetworkAddresses | ( | ) |
Return IPv4/IPv6 address entries for the local network interfaces.
One NetworkAddressInfo is returned per address, so an interface can occur multiple times when it has multiple IPv4/IPv6 addresses. Link-layer entries (AF_PACKET / AF_LINK) are ignored.
| std::vector< NetworkInterface > NET::getNetworkInterfaces | ( | ) |
Returns list of all network interfaces regardless of their state.
This function does not understand interfaces with multiple addresses For example when using zeroconf (eth0, eth0:avahi) it would only list eth0 In this case eth0 does not have an ip address yet and getInterfaceAddress("eth0") throws
| std::string NET::resolveHostname | ( | const std::string & | hostname | ) |
Resolve the specified hostname to a standard IPv4 address. If the operating system doesn't know the hostname yet this means a DNS lookup.
| hostname | domain name |
| uint16_t NET::resolveService | ( | const std::string & | service, |
| const std::string & | protocol = "tcp" ) |
Resolve the specified service for the specified protocol to the corresponding port number in host byte order.
| service | service to resolve (e.g. "http") |
| protocol | protocol of service to resolve. Default is "tcp". To match to any protocol, pass an empty string (""). |