| 807 | #endif |
| 808 | |
| 809 | static void server_open(FIBER_SERVER *server, ACL_ARGV *addrs) |
| 810 | { |
| 811 | const char *myname = "server_open"; |
| 812 | ACL_ITER iter; |
| 813 | unsigned flag = ACL_INET_FLAG_NONE; |
| 814 | int i = 0; |
| 815 | |
| 816 | if (var_fiber_master_reuseport) { |
| 817 | flag |= ACL_INET_FLAG_REUSEPORT; |
| 818 | } |
| 819 | |
| 820 | acl_foreach(iter, addrs) { |
| 821 | const char* addr = (const char*) iter.data; |
| 822 | ACL_VSTREAM* sstream = acl_vstream_listen_ex(addr, 128, |
| 823 | flag, 0, 0); |
| 824 | if (sstream == NULL) { |
| 825 | acl_msg_fatal("%s(%d): listen %s error(%s)", |
| 826 | myname, __LINE__, addr, acl_last_serror()); |
| 827 | } |
| 828 | |
| 829 | acl_msg_info("%s: listen %s ok", myname, addr); |
| 830 | |
| 831 | #if !defined(_WIN32) && !defined(_WIN64) |
| 832 | acl_close_on_exec(ACL_VSTREAM_SOCK(sstream), ACL_CLOSE_ON_EXEC); |
| 833 | #endif |
| 834 | server->sstreams[i++] = sstream; |
| 835 | } |
| 836 | } |
| 837 | |
| 838 | static void servers_open(const char *addrs, int fdtype, int nthreads) |
| 839 | { |
no outgoing calls
no test coverage detected
searching dependent graphs…