diff options
-rw-r--r-- | sockets.c | 3 | ||||
-rw-r--r-- | sockets.h | 3 |
2 files changed, 5 insertions, 1 deletions
@@ -750,6 +750,9 @@ sock_address_list_create( const char* hostname, else ai.ai_flags |= AI_CANONNAME; + if (flags & SOCKET_LIST_DGRAM) + ai.ai_socktype = SOCK_DGRAM; + while (1) { struct addrinfo hints = ai; @@ -258,7 +258,8 @@ int sock_address_get_numeric_info( SockAddress* a, enum { SOCKET_LIST_PASSIVE = (1 << 0), SOCKET_LIST_FORCE_INET = (1 << 1), - SOCKET_LIST_FORCE_IN6 = (1 << 2) + SOCKET_LIST_FORCE_IN6 = (1 << 2), + SOCKET_LIST_DGRAM = (1 << 3), }; /* resolve a host and service/port name into a list of SockAddress objects. |