MCPcopy Create free account
hub / github.com/acl-dev/acl / server_open

Function server_open

lib_fiber/cpp/src/fiber_server.cpp:809–836  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

807#endif
808
809static 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
838static void servers_open(const char *addrs, int fdtype, int nthreads)
839{

Callers 1

servers_openFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…