lib/tsocket: add tsocket_connect_send/recv()