improvements pointed out by tsuna: remove dependency on curl and keep a long-lived connection to the TSD