|
MPD
0.17~git
|
#include <glib.h>Go to the source code of this file.
Functions | |
| static G_GNUC_CONST GQuark | resolver_quark (void) |
| G_GNUC_MALLOC char * | sockaddr_to_string (const struct sockaddr *sa, size_t length, GError **error) |
| Converts the specified socket address into a string in the form "IP:PORT". | |
| struct addrinfo * | resolve_host_port (const char *host_port, unsigned default_port, int flags, int socktype, GError **error_r) |
| Resolve a specification in the form "host", "host:port", "[host]:port". | |
| struct addrinfo* resolve_host_port | ( | const char * | host_port, |
| unsigned | default_port, | ||
| int | flags, | ||
| int | socktype, | ||
| GError ** | error_r | ||
| ) | [read] |
Resolve a specification in the form "host", "host:port", "[host]:port".
This is a convenience wrapper for getaddrinfo().
| default_port | a default port number that will be used if none is given in the string (if applicable); pass 0 to go without a default |
| static G_GNUC_CONST GQuark resolver_quark | ( | void | ) | [inline, static] |
Definition at line 30 of file resolver.h.
| G_GNUC_MALLOC char* sockaddr_to_string | ( | const struct sockaddr * | sa, |
| size_t | length, | ||
| GError ** | error | ||
| ) |
Converts the specified socket address into a string in the form "IP:PORT".
The return value must be freed with g_free() when you don't need it anymore.
| sa | the sockaddr struct |
| length | the length of #sa in bytes |
| error | location to store the error occurring, or NULL to ignore errors |
1.7.5.1