mirror of
https://github.com/Lizonghang/prima.cpp.git
synced 2025-09-11 12:14:34 +00:00
fix: replace localhost to 127.0.0.1
This commit is contained in:
parent
fbbc30c950
commit
104e3b2356
3 changed files with 17 additions and 17 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue