fix: replace localhost to 127.0.0.1

This commit is contained in:
DeEMO 2025-06-17 11:27:58 +08:00
parent fbbc30c950
commit 104e3b2356
3 changed files with 17 additions and 17 deletions

View file

@ -5,7 +5,7 @@
#include <arpa/inet.h>
#include <unistd.h>
bool isPortOpen(const std::string& ip, uint32_t port, int timeout_sec) {
bool is_port_open(const std::string& ip, uint32_t port, int timeout_sec) {
int sock = socket(AF_INET, SOCK_STREAM, 0);
if (sock < 0) return false;