new cspot/bell

This commit is contained in:
philippe44
2023-05-06 23:50:26 +02:00
parent e0e7e718ba
commit 8bad480112
163 changed files with 6611 additions and 6739 deletions

View File

@@ -39,6 +39,8 @@ class TCPSocket : public bell::Socket {
TCPSocket(){};
~TCPSocket() { close(); };
int getFd() { return sockFd; }
void open(const std::string& host, uint16_t port) {
int err;
int domain = AF_INET;
@@ -101,7 +103,9 @@ class TCPSocket : public bell::Socket {
#endif
return value;
}
bool isOpen() { return !isClosed; }
bool isOpen() {
return !isClosed;
}
void close() {
if (!isClosed) {