sources/network/udpsocket.cpp

changeset 145
d0aedc9be448
parent 109
e4966d7e615d
child 150
37db42ad451a
child 152
6be21be4bea1
equal deleted inserted replaced
144:e8d58327cd7f 145:d0aedc9be448
103 svaddr.sin_port = htons (port); 103 svaddr.sin_port = htons (port);
104 svaddr.sin_addr.s_addr = htonl (INADDR_ANY); 104 svaddr.sin_addr.s_addr = htonl (INADDR_ANY);
105 105
106 if (::bind (m_socket, reinterpret_cast<sockaddr*> (&svaddr), sizeof svaddr) == -1) 106 if (::bind (m_socket, reinterpret_cast<sockaddr*> (&svaddr), sizeof svaddr) == -1)
107 { 107 {
108 m_error = String ("Couldn't bind to port ") + String::from_number (port); 108 m_error = String ("Couldn't bind to port ") + String::fromNumber (port);
109 return false; 109 return false;
110 } 110 }
111 111
112 return true; 112 return true;
113 } 113 }

mercurial