ingore unix sockets on windows

This commit is contained in:
Adrian Liechti 2024-04-01 10:25:47 +02:00
parent 77d29ed78b
commit 0b70ac0f66

View file

@ -2861,10 +2861,12 @@ int main(int argc, char ** argv) {
svr->set_read_timeout (sparams.read_timeout);
svr->set_write_timeout(sparams.write_timeout);
#ifndef _WIN32
if (sparams.hostname.substr(0, 7) == "unix://") {
svr->set_address_family(AF_UNIX);
sparams.hostname = sparams.hostname.substr(7);
}
#endif
if (!svr->bind_to_port(sparams.hostname, sparams.port)) {
fprintf(stderr, "\ncouldn't bind to server socket: hostname=%s port=%d\n\n", sparams.hostname.c_str(), sparams.port);