둘 다 동시 디버깅을 위해 push
This commit is contained in:
@@ -67,6 +67,7 @@ int Socket::bind(Address __addr) {
|
||||
}
|
||||
|
||||
int Socket::recvfrom(void *__restrict __buf, size_t __n, int __flags, struct Address& __addr) {
|
||||
std::lock_guard<std::mutex> lock(readMutex);
|
||||
int retVal = ::recvfrom(sock, (char*)__buf, __n, __flags, &__addr.addr, &__addr.length);
|
||||
if (retVal == SOCKET_ERROR)
|
||||
log::error("recvfrom()");
|
||||
@@ -74,6 +75,7 @@ int Socket::recvfrom(void *__restrict __buf, size_t __n, int __flags, struct Add
|
||||
}
|
||||
|
||||
int Socket::sendto(const void *__buf, size_t __n, int __flags, struct Address __addr) {
|
||||
std::lock_guard<std::mutex> lock(writeMutex);
|
||||
int retVal = ::sendto(sock, (char*)__buf, __n, __flags, &__addr.addr, __addr.length);
|
||||
if (retVal == SOCKET_ERROR)
|
||||
log::error("sendto()");
|
||||
|
||||
Reference in New Issue
Block a user