일단 bind까지 구현 완료료
This commit is contained in:
@@ -9,11 +9,11 @@ Socket_Init::Socket_Init(std::int32_t domain, std::int32_t type, std::int32_t pr
|
||||
#ifdef _WIN32
|
||||
WSADATA wsa;
|
||||
if (WSAStartup(MAKEWORD(2, 2), &wsa) != 0)
|
||||
log::critical("WSAStartup()", true);
|
||||
log::critical("WSAStartup()");
|
||||
#endif
|
||||
sock_ = socket(domain, type, protocol);
|
||||
if (sock_ == INVALID_SOCKET)
|
||||
log::critical("socket()", true);
|
||||
log::critical("socket()");
|
||||
|
||||
valid_ = true;
|
||||
}
|
||||
@@ -36,4 +36,10 @@ Socket_Init::operator SOCKET() const {
|
||||
return INVALID_SOCKET;
|
||||
};
|
||||
|
||||
void Socket_Init::bind(int __fd, const sockaddr *__addr, socklen_t __len) {
|
||||
int retVal = ::bind(__fd, __addr, __len);
|
||||
if (retVal == INVALID_SOCKET)
|
||||
log::critical("bind()");
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user