getsockname does not return an IP address for wildcarded UDP socket

so we must force use of loop back address
This commit is contained in:
Jeff Hill
2000-08-25 15:40:06 +00:00
parent 5fcac78ee1
commit b1d85b357c
+2
View File
@@ -474,6 +474,8 @@ void udpiiu::shutdown ()
msg.m_cid = htonl ( 0u );
msg.m_postsize = htons ( 0u );
addr.ia.sin_addr.s_addr = htonl ( INADDR_LOOPBACK );
// send a wakeup msg so the UDP recv thread will exit
status = sendto ( this->sock, reinterpret_cast < const char * > ( &msg ), sizeof (msg), 0,
&addr.sa, sizeof ( addr.sa ) );