Interface similar to Stdio.File.
Handles blocking and nonblocking mode.
Handles callback mode in an arbitrary backend (also in blocking mode).
Read and write operations might each do both reading and writing. In callback mode that means that installing either a read or a write callback might install both internally. It also means that reading in one thread while writing in another doesn't work.
Apart from the above, thread safety/atomicity characteristics are retained.
Blocking characterstics are retained for all functions.
destroy attempts to close the stream properly by sending the close packet, but since it can't do blocking I/O it's not certain that it will succeed. The stream should therefore always be closed with an explicit close call.
Abrupt remote close without the proper handshake gets the errno System.EPIPE.
Objects do not contain cyclic references, so they are closed and destructed timely when dropped.