MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / select_accept

Function select_accept

src/remote/inet.cpp:2156–2189  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2154}
2155
2156static rem_port* select_accept( rem_port* main_port)
2157{
2158/**************************************
2159 *
2160 * s e l e c t _ a c c e p t
2161 *
2162 **************************************
2163 *
2164 * Functional description
2165 * Accept a new connection request.
2166 *
2167 **************************************/
2168
2169 rem_port* const port = alloc_port(main_port);
2170 inet_ports->registerPort(port);
2171
2172 port->port_handle = os_utils::accept(main_port->port_handle, NULL, NULL);
2173 if (port->port_handle == INVALID_SOCKET)
2174 {
2175 inet_error(true, port, "accept", isc_net_connect_err, INET_ERRNO);
2176 }
2177
2178 setKeepAlive(port->port_handle);
2179
2180 port->port_flags |= PORT_server;
2181
2182 if (main_port->port_server_flags & SRVR_thread_per_port)
2183 {
2184 port->port_server_flags = (SRVR_server | SRVR_inet | SRVR_thread_per_port);
2185 return port;
2186 }
2187
2188 return 0;
2189}
2190
2191static void select_port(rem_port* main_port, Select* selct, RemPortPtr& port)
2192{

Callers 1

select_multiFunction · 0.85

Calls 5

inet_errorFunction · 0.85
setKeepAliveFunction · 0.85
registerPortMethod · 0.80
alloc_portFunction · 0.70
acceptFunction · 0.70

Tested by

no test coverage detected