.dll .so 복사 자동화 완료

This commit is contained in:
2025-04-28 11:25:53 +09:00
parent f76e1b9a5d
commit 41c75b9dca
15 changed files with 165 additions and 69 deletions

View File

@@ -16,7 +16,7 @@ void TCPSocket::listen(int __n) {
}
void TCPSocket::accept(TCPSocket& newSock, Address& __addr) {
newSock.move(::accept(sock_, &__addr.addr, &__addr.length));
newSock.set(::accept(sock_, &__addr.addr, &__addr.length));
if (newSock == INVALID_SOCKET)
log::critical("accept()");
}
@@ -27,6 +27,18 @@ void TCPSocket::connect(Chattr::Address& serveraddr) {
log::critical("connect()");
}
int TCPSocket::recv(void *__restrict __buf, size_t __n, int __flags) {
int retVal = ::recv(sock_, __buf, __n, __flags);
if (retVal == SOCKET_ERROR)
log::error("recv()");
return retVal;
}
int TCPSocket::send(const void *__buf, size_t __n, int __flags) {
int retVal = ::send(sock_, __buf, __n, __flags);
if (retVal == SOCKET_ERROR)
log::error("send()");
return retVal;
}
}