init_worker_state
is called with the init_arg
passed to spawn
or serve
If spawn
was called, it is highly recommeded to call
connect_and_shutdown_on_disconnect_exn
on the supplied heartbeater of the spawner.
The Cleanup.connect_and_shutdown_on_disconnect_if_spawned_exn
function does just
this for you.
init_connection_state
is called with the init_arg
passed to Connection.client
connection
should only be used to register close_finished
callbacks, not to
dispatch.