Ported asynchronous sockets from Juno.