+sock = socket(AF_INET, SOCK_DGRAM, 0);
+
+if (sock < 0)
+ {
+ throw std::runtime_error(std::string("USER::USER() - socket creation error: '") + strerror(errno) + "', ip: " + inet_ntostring(ip) + ", login: " + login);
+ }
+
+struct sockaddr_in addr;
+
+addr.sin_family = AF_INET;
+addr.sin_addr.s_addr = ip;
+addr.sin_port = htons(5554); // :(
+
+int res = bind(sock, (struct sockaddr *)&addr, sizeof(addr));
+if (res == -1)
+ {
+ throw std::runtime_error(std::string("USER::USER() - bind error: '") + strerror(errno) + "', ip: " + inet_ntostring(ip) + ", login: " + login);
+ }
+
+return true;