Client and server middleware support inspired by Connect.