자잘한 버그 해결

This commit is contained in:
2025-04-23 01:21:36 +09:00
parent 89cac9c54f
commit cebf59ddd8
6 changed files with 59 additions and 48 deletions

View File

@@ -32,6 +32,12 @@ int main() {
sock.listen(SOMAXCONN);
struct Chattr::TCPSocket clientSock;
struct Chattr::Address clientAddr;
if (config.ipVersion == 4)
clientAddr.length = sizeof(sockaddr_in);
else
clientAddr.length = sizeof(sockaddr_in6);
spdlog::info("Waiting for connection...");
sock.accept(clientSock, clientAddr);
}