sources/network/udpsocket.cpp

branch
protocol5
changeset 150
37db42ad451a
parent 131
4996c8684b93
parent 145
d0aedc9be448
child 153
82aac80a2f1d
equal deleted inserted replaced
141:d9073c13dc98 150:37db42ad451a
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