some review

This commit is contained in:
wt committed 2024-07-17 02:02:51 +07:00
1 parent 726b8807e0
commit aa658131a7
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -52,11 +52,11 @@ OpenRouter::OpenRouter() {
OpenRouter::~OpenRouter() = default; OpenRouter::~OpenRouter() = default;
int OpenRouter::serve(const std::string *ip, int port, int socket_flags) { int OpenRouter::serve(const std::string &ip, int port, int socket_flags) {
std::cout << GREEN << "Starting" << RESET << " server on [ " << YELLOW std::cout << GREEN << "Starting" << RESET << " server on [ " << YELLOW
<< "0.0.0.0" << RESET << ":" << CYAN << "43244" << RESET << " ]" << std::endl; << "0.0.0.0" << RESET << ":" << CYAN << "43244" << RESET << " ]" << std::endl;
syslog(LOG_INFO, "openrouter administration software started."); syslog(LOG_INFO, "openrouter administration software started.");
srv.listen("127.0.0.1", 43244); this->srv.listen(ip, port, socket_flags);
return 0; return 0;
} }
+1 -1
View File
@@ -13,7 +13,7 @@ class OpenRouter {
public: public:
OpenRouter(); OpenRouter();
~OpenRouter(); ~OpenRouter();
int serve(const std::string *ip, int port, int socket_flags = 0); int serve(const std::string &ip, int port, int socket_flags = 0);
}; };
#endif // OPENROUTER_HPP #endif // OPENROUTER_HPP