summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Socket.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Socket.cc b/src/Socket.cc
index 05c5e83..a28b4c1 100644
--- a/src/Socket.cc
+++ b/src/Socket.cc
@@ -320,6 +320,8 @@ bool Balau::Socket::setLocal(const char * hostname, int port) {
struct addrinfo hints;
memset(&hints, 0, sizeof(hints));
hints.ai_family = AF_INET6;
+ hints.ai_socktype = SOCK_STREAM;
+ hints.ai_protocol = IPPROTO_TCP;
hints.ai_flags = AI_V4MAPPED;
m_req = resolveName(hostname, NULL, &hints);
@@ -377,6 +379,8 @@ bool Balau::Socket::connect(const char * hostname, int port) {
struct addrinfo hints;
memset(&hints, 0, sizeof(hints));
hints.ai_family = AF_INET6;
+ hints.ai_socktype = SOCK_STREAM;
+ hints.ai_protocol = IPPROTO_TCP;
hints.ai_flags = AI_V4MAPPED;
m_req = resolveName(hostname, NULL, &hints);