Browse Source

Test

etomic
jl777 7 years ago
parent
commit
1298841a12
  1. 4
      iguana/exchanges/LP_commands.c
  2. 2
      iguana/exchanges/LP_nativeDEX.c

4
iguana/exchanges/LP_commands.c

@ -52,11 +52,11 @@ char *stats_JSON(char *myipaddr,int32_t pubsock,double profitmargin,cJSON *argjs
} }
if ( strcmp(method,"hello") == 0 ) if ( strcmp(method,"hello") == 0 )
return(0); return(0);
else if ( 0 && strcmp(method,"nn_tests") == 0 ) else if ( strcmp(method,"nn_tests") == 0 )
{ {
LP_send(pubsock,"nn_test return",0); LP_send(pubsock,"nn_test return",0);
printf("send back nn_test return -> %d\n",pubsock); printf("send back nn_test return -> %d\n",pubsock);
return(0); return(clonestr("{\"result\":\"success\"}"));
} }
else if ( strcmp(method,"help") == 0 ) else if ( strcmp(method,"help") == 0 )
return(clonestr("{\"result\":\" \ return(clonestr("{\"result\":\" \

2
iguana/exchanges/LP_nativeDEX.c

@ -370,7 +370,7 @@ void nn_tests(int32_t pullsock,char *pushaddr)
nn_setsockopt(sock,NN_SOL_SOCKET,NN_SNDTIMEO,&timeout,sizeof(timeout)); nn_setsockopt(sock,NN_SOL_SOCKET,NN_SNDTIMEO,&timeout,sizeof(timeout));
nn_setsockopt(sock,NN_SOL_SOCKET,NN_RCVTIMEO,&timeout,sizeof(timeout)); nn_setsockopt(sock,NN_SOL_SOCKET,NN_RCVTIMEO,&timeout,sizeof(timeout));
//n = nn_send(sock,"nn_tests",(int32_t)strlen("nn_tests")+1,0*NN_DONTWAIT); //n = nn_send(sock,"nn_tests",(int32_t)strlen("nn_tests")+1,0*NN_DONTWAIT);
sprintf(msg,"{\"nn_tests\":\"%s\"}",pushaddr); sprintf(msg,"{\"method\":\"nn_tests\",\"ipaddr\":\"%s\"}",pushaddr);
n = LP_send(sock,msg,0);// n = LP_send(sock,msg,0);//
sleep(1); sleep(1);
//m = nn_recv(pullsock,&ptr,NN_MSG,0); //m = nn_recv(pullsock,&ptr,NN_MSG,0);

Loading…
Cancel
Save