|
|
@ -349,7 +349,7 @@ void LP_mainloop(char *myipaddr,struct LP_peerinfo *mypeer,uint16_t mypubport,in |
|
|
|
void nn_tests(int32_t pullsock,char *pushaddr) |
|
|
|
{ |
|
|
|
int32_t sock,n,timeout,m=0; char msg[512];//void *ptr;
|
|
|
|
if ( (sock= nn_socket(AF_SP,NN_REQ)) >= 0 ) |
|
|
|
if ( (sock= nn_socket(AF_SP,LP_COMMAND_SENDSOCK)) >= 0 ) |
|
|
|
{ |
|
|
|
if ( nn_connect(sock,pushaddr) < 0 ) |
|
|
|
printf("connect error %s\n",nn_strerror(nn_errno())); |
|
|
@ -409,7 +409,7 @@ void LPinit(uint16_t myport,uint16_t mypullport,uint16_t mypubport,double profit |
|
|
|
} else printf("error getting myipaddr\n"); |
|
|
|
} else printf("error issuing curl\n"); |
|
|
|
nanomsg_transportname(0,pushaddr,myipaddr,mypullport); |
|
|
|
if ( (pullsock= nn_socket(AF_SP,NN_REP)) >= 0 ) |
|
|
|
if ( (pullsock= nn_socket(AF_SP,LP_COMMAND_RECVSOCK)) >= 0 ) |
|
|
|
{ |
|
|
|
timeout = 1; |
|
|
|
nn_setsockopt(pullsock,NN_SOL_SOCKET,NN_RCVTIMEO,&timeout,sizeof(timeout)); |
|
|
|