| 1268 | } |
| 1269 | |
| 1270 | rem_port* INET_server(SOCKET sock) |
| 1271 | { |
| 1272 | /************************************** |
| 1273 | * |
| 1274 | * I N E T _ s e r v e r |
| 1275 | * |
| 1276 | ************************************** |
| 1277 | * |
| 1278 | * Functional description |
| 1279 | * We have been spawned by a master server with a connection |
| 1280 | * established. Set up port block with the appropriate socket. |
| 1281 | * |
| 1282 | **************************************/ |
| 1283 | rem_port* const port = alloc_port(NULL); |
| 1284 | port->port_flags |= PORT_server; |
| 1285 | port->port_server_flags |= SRVR_server; |
| 1286 | port->port_handle = sock; |
| 1287 | |
| 1288 | if (! setKeepAlive(port->port_handle)) { |
| 1289 | gds__log("inet server err: setting KEEPALIVE socket option \n"); |
| 1290 | } |
| 1291 | |
| 1292 | if (! setNoNagleOption(port)) { |
| 1293 | gds__log("inet server err: setting NODELAY socket option \n"); |
| 1294 | } |
| 1295 | |
| 1296 | return port; |
| 1297 | } |
| 1298 | |
| 1299 | static bool accept_connection(rem_port* port, const P_CNCT* cnct) |
| 1300 | { |
no test coverage detected