API change of add_connection.