A basic connect-style middleware handler