[client][events] Update to use the new library connection function.