Called when there are bytes available for reading, or space available to write.
Any exception that leads to a termination of the connection like an IOException should not be handled in the handle method
but should be propagated. The reason behind this is that the handle logic already is complicated enough and by pulling it
out the flow will be easier to understand.