Refactor attach() callback to return a request object that can be used to accept() or reject() the connection.