log opened connection

This commit is contained in:
John
2022-12-11 06:32:01 +01:00
parent f0d01f9621
commit 1bd7ef5f5a
+3
View File
@@ -808,6 +808,7 @@ int openSerial(std::string port) {
close(fd); close(fd);
return -1; return -1;
} }
std::cout << "opened " << port << std::endl;
return fd; return fd;
} }
@@ -819,6 +820,7 @@ int openNet(std::string host, uint16_t port) {
return -1; return -1;
} }
fcntl(fd, F_SETFL, O_NONBLOCK); // set non-blocking fcntl(fd, F_SETFL, O_NONBLOCK); // set non-blocking
std::cout << "opened " << host << ":" << static_cast<unsigned>(port) << std::endl;
return fd; return fd;
} }
@@ -1241,6 +1243,7 @@ int main(int argc, char* argv[]) {
continue; continue;
} }
run(fd); run(fd);
std::cout << std::endl;
} }
return 0; return 0;
} }