Bind connect method from middleware to middleware object.