remote_send_thread
error = pthread_create(&td, NULL, remote_send_thread, res);
static void *remote_send_thread(void *arg);