Merge d7a7a780c9
into 8cb508d0d5
This commit is contained in:
commit
afed7ee0db
1 changed files with 7 additions and 0 deletions
|
@ -2563,6 +2563,13 @@ int main(int argc, char ** argv) {
|
||||||
svr->set_read_timeout (params.timeout_read);
|
svr->set_read_timeout (params.timeout_read);
|
||||||
svr->set_write_timeout(params.timeout_write);
|
svr->set_write_timeout(params.timeout_write);
|
||||||
|
|
||||||
|
#ifndef _WIN32
|
||||||
|
if (params.hostname.substr(0, 7) == "unix://") {
|
||||||
|
svr->set_address_family(AF_UNIX);
|
||||||
|
params.hostname = params.hostname.substr(7);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (!svr->bind_to_port(params.hostname, params.port)) {
|
if (!svr->bind_to_port(params.hostname, params.port)) {
|
||||||
fprintf(stderr, "\ncouldn't bind to server socket: hostname=%s port=%d\n\n", params.hostname.c_str(), params.port);
|
fprintf(stderr, "\ncouldn't bind to server socket: hostname=%s port=%d\n\n", params.hostname.c_str(), params.port);
|
||||||
return 1;
|
return 1;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue