자잘한 수정, 이제 다른 소켓으로 쓰기 요청 할 수 있을 듯
This commit is contained in:
@@ -80,12 +80,24 @@ int Socket::sendto(const void *__buf, size_t __n, int __flags, struct Address __
|
||||
return retVal;
|
||||
}
|
||||
|
||||
Socket::Socket(const Socket& other_) {
|
||||
memcpy(this, &other_, sizeof(Socket));
|
||||
valid_ = false;
|
||||
}
|
||||
|
||||
Socket::Socket(Socket &&other_) noexcept {
|
||||
other_.valid_ = false;
|
||||
memcpy(this, &other_, sizeof(Socket));
|
||||
valid_ = true;
|
||||
}
|
||||
|
||||
Socket& Socket::operator=(const Socket& other_) {
|
||||
memcpy(this, &other_, sizeof(Socket));
|
||||
valid_ = false;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
Socket& Socket::operator=(Socket && other_) noexcept {
|
||||
other_.valid_ = false;
|
||||
memcpy(this, &other_, sizeof(Socket));
|
||||
|
||||
Reference in New Issue
Block a user