call curl cb when connecting