whenClosed
Registers a callback to be invoked when this channel closes.
Parameters
callback
the lambda to invoke when the channel closes
Registers a callback to be invoked when this channel closes.
the lambda to invoke when the channel closes