|
|
@ -408,7 +408,7 @@ char *_dex_reqsend(struct supernet_info *myinfo,char *handler,uint8_t *key,int32 |
|
|
|
printf("%d: subscribe connect (%s)\n",myinfo->numdexipbits,str); |
|
|
|
} |
|
|
|
} |
|
|
|
if ( 0 && (rand() % 100) < 40 ) |
|
|
|
if ( (rand() % 100) < 40 ) |
|
|
|
{ |
|
|
|
nanomsg_tcpname(0,str,ipaddr,REP_SOCK); |
|
|
|
nn_connect(myinfo->reqsock,str); |
|
|
@ -1975,11 +1975,11 @@ int32_t dpow_nanomsg_update(struct supernet_info *myinfo) |
|
|
|
while ( (size= nn_recv(myinfo->repsock,&dexp,NN_MSG,0)) > 0 ) |
|
|
|
{ |
|
|
|
num++; |
|
|
|
printf("REP got %d crc.%08x\n",size,calc_crc32(0,(void *)dexp,size)); |
|
|
|
//printf("REP got %d crc.%08x\n",size,calc_crc32(0,(void *)dexp,size));
|
|
|
|
if ( (retstr= dex_response(&broadcastflag,myinfo,dexp)) != 0 ) |
|
|
|
{ |
|
|
|
signed_nn_send(myinfo,myinfo->ctx,myinfo->persistent_priv,myinfo->repsock,retstr,(int32_t)strlen(retstr)+1); |
|
|
|
printf("send back[%ld]\n",strlen(retstr)+1); |
|
|
|
//printf("send back[%ld]\n",strlen(retstr)+1);
|
|
|
|
free(retstr); |
|
|
|
if ( broadcastflag != 0 ) |
|
|
|
{ |
|
|
|