finish refactor, add docs and CI
CI / Build NRO (push) Failing after 3s
CI / Format check (push) Successful in 34s
CI / Layering check (push) Successful in 1s

This commit is contained in:
2026-04-27 01:49:41 +03:00
parent dc65a4c8a9
commit b4ab3e6463
47 changed files with 1964 additions and 1470 deletions
+17 -6
View File
@@ -6,13 +6,24 @@ struct Socket {
Socket() = default;
explicit Socket(int fd) : fd(fd) {}
~Socket() { if (fd >= 0) close(fd); }
~Socket() {
if (fd >= 0)
close(fd);
}
Socket(const Socket&) = delete;
Socket(const Socket&) = delete;
Socket& operator=(const Socket&) = delete;
Socket(Socket&& o) : fd(o.fd) { o.fd = -1; }
Socket(Socket&& o) : fd(o.fd) {
o.fd = -1;
}
operator int() const { return fd; }
bool valid() const { return fd >= 0; }
void release() { fd = -1; }
operator int() const {
return fd;
}
bool valid() const {
return fd >= 0;
}
void release() {
fd = -1;
}
};