|
| int | jsocketpp::InitSockets () |
| int | jsocketpp::CleanupSockets () |
| int | jsocketpp::GetSocketError () |
| int | jsocketpp::CloseSocket (SOCKET fd) |
| const char * | jsocketpp::inet_ntop_aux (int af, const void *src, char *dst, socklen_t size) |
| int | jsocketpp::ioctlsocket (const SOCKET fd, const long cmd, u_long *argp) |
| std::vector< std::string > | jsocketpp::getHostAddr () |
| | Get all local network interface addresses as strings.
|
| std::string | jsocketpp::SocketErrorMessage (int error, bool gaiStrerror=false) |
| | Convert a socket-related error code to a human-readable message.
|
| bool | jsocketpp::isIPv4MappedIPv6 (const sockaddr_in6 *addr6) |
| | Checks if a given sockaddr_in6 represents an IPv4-mapped IPv6 address.
|
| sockaddr_in | jsocketpp::convertIPv4MappedIPv6ToIPv4 (const sockaddr_in6 &addr6) |
| | Converts an IPv4-mapped IPv6 address to a pure IPv4 sockaddr_in.
|
| std::string | jsocketpp::ipFromSockaddr (const sockaddr *addr, bool convertIPv4Mapped=true) |
| | Extracts a human-readable IP address from a socket address structure.
|
| Port | jsocketpp::portFromSockaddr (const sockaddr *addr) |
| | Extracts the port number from a socket address structure.
|
| std::string | jsocketpp::addressToString (const sockaddr_storage &addr) |
| | Converts a socket address to a human-readable "IP:port" string.
|
| void | jsocketpp::stringToAddress (const std::string &str, sockaddr_storage &addr) |
| | Parses an "IP:port" string into a sockaddr_storage structure.
|
| uint16_t | jsocketpp::net::toNetwork (const uint16_t val) |
| | Converts a 16-bit unsigned integer from host to network byte order.
|
| uint32_t | jsocketpp::net::toNetwork (const uint32_t val) |
| | Converts a 32-bit unsigned integer from host to network byte order.
|
| uint16_t | jsocketpp::net::fromNetwork (const uint16_t val) |
| | Converts a 16-bit unsigned integer from network to host byte order.
|
| uint32_t | jsocketpp::net::fromNetwork (const uint32_t val) |
| | Converts a 32-bit unsigned integer from network to host byte order.
|
| AddrinfoPtr | jsocketpp::internal::resolveAddress (const std::string_view host, const Port port, const int family, const int socktype, const int protocol, const int flags=0) |
| | Resolves a hostname and port into a list of usable socket address structures.
|
| std::string | jsocketpp::internal::getBoundLocalIp (SOCKET sockFd) |
| | Retrieves the local IP address to which the socket is currently bound.
|
| bool | jsocketpp::internal::ipAddressesEqual (const std::string &ip1, const std::string &ip2) |
| | Compares two IP addresses for logical equality, accounting for IPv4-mapped IPv6 forms.
|
| void | jsocketpp::internal::sendExact (SOCKET fd, const void *data, std::size_t size) |
| | Sends an entire datagram to a connected peer using send().
|
| void | jsocketpp::internal::sendExactTo (SOCKET fd, const void *data, std::size_t size, const sockaddr *addr, socklen_t addrLen, void(*afterSuccess)(void *ctx), void *ctx) |
| | Sends an entire datagram to a specific destination using sendto().
|
| bool | jsocketpp::internal::tryCloseNoexcept (const SOCKET fd) noexcept |
| | Attempts to close a socket descriptor without throwing exceptions.
|
| void | jsocketpp::internal::closeOrThrow (const SOCKET fd) |
| | Closes a socket descriptor and throws on failure.
|
| std::size_t | jsocketpp::internal::nextDatagramSize (SOCKET fd) noexcept |
| | Query the exact size of the next UDP datagram, if the platform can provide it.
|
| ssize_t | jsocketpp::internal::recvInto (const SOCKET fd, std::span< std::byte > dst, const int flags, sockaddr_storage *src, socklen_t *srcLen) |
| | Receive into a caller-provided span, routing to recv() or recvfrom() as needed.
|
| void | jsocketpp::internal::throwLastSockError (const std::source_location &loc=std::source_location::current()) |
| | Throw a SocketException for the last socket error, with optional source-location context.
|
| void | jsocketpp::internal::resolveNumericHostPort (const sockaddr *sa, const socklen_t len, std::string &host, Port &port) |
| | Resolve numeric host and port from a socket address.
|
Common platform and utility includes for jsocketpp.