sources/network/udpsocket.cpp

changeset 182
20ca0a6be175
parent 180
2e7225dbd9b2
child 183
9b6a0daedfc0
equal deleted inserted replaced
181:e254398fcc7c 182:20ca0a6be175
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::fromNumber (port); 108 m_error = "Couldn't bind to port "s + std::to_string(port);
109 return false; 109 return false;
110 } 110 }
111 111
112 return true; 112 return true;
113 } 113 }

mercurial