change API: raise exception nn_connect/nn_send/nn_recv failed