Finish tcp client socket

This commit is contained in:
momo5502
2025-01-12 08:23:47 +01:00
parent 21e2f6f999
commit 8333c25f2c
9 changed files with 57 additions and 30 deletions

View File

@@ -13,14 +13,7 @@ namespace network
address a{};
auto len = a.get_max_size();
auto s = ::accept(this->get_socket(), &a.get_addr(), &len);
if (s == INVALID_SOCKET)
{
return {};
}
return tcp_client_socket{s, a};
return ::accept(this->get_socket(), &a.get_addr(), &len);
}
void tcp_server_socket::listen()