Set to a non-zero value whenever the server receives a SIGCHLD signal.
Return non-zero if the core is in the process of shutting down (typically as a result of a signal).
Call func for each socket, passing additionally the second arg closure. If func returns a negative value, return immediately with that value (breaking out of the loop), otherwise, return 0.
Return the socket structure for the socket id id and the version
NULL if no such socket exists. If version
is -1 it is not checked.
Mark socket sock as killed. That means that no further operations except disconnecting and freeing are allowed. All marked sockets will be deleted once the server loop is through.
Enqueue the socket sock into the list of sockets handled by the server loop.
Set the child socket’s parent to parent.
This should be called whenever a listener accepts a connection and creates a new child socket.
Return the child socket’s parent socket structure, or
if this socket does not exist anymore. This might happen if a listener
dies for some reason.
Set the referring socket structure of sock to referrer.
If referrer is
NULL the reference will be invalidated.
This can be used to create some relationship between two socket structures.
Get the referrer of the socket structure sock.
NULL if there is no such socket.
Return the parent’s port configuration of sock,
NULL if the given socket has no parent, i.e. is a listener.