Is there a way to determine if a socket has been closed other than with a try-catch block?
Is there a way to interrupt a receiveBytes call other than closing the socket?
What condition(s) does the poll(to, SELECT_ERROR) call return true?
It seems that if the peer connection has been closed then the poll(to, SELECT_READ) and poll(to, SELECT_WRITE) will both return true. Can both calls return true without the peer being closed?