|
@ -628,8 +628,9 @@ void dpow_nanomsginit(struct supernet_info *myinfo,char *ipaddr) |
|
|
else |
|
|
else |
|
|
{ |
|
|
{ |
|
|
timeout = 500; |
|
|
timeout = 500; |
|
|
nn_setsockopt(dexsock,NN_SOL_SOCKET,NN_SNDTIMEO,&timeout,sizeof(timeout)); |
|
|
|
|
|
nn_setsockopt(repsock,NN_SOL_SOCKET,NN_SNDTIMEO,&timeout,sizeof(timeout)); |
|
|
nn_setsockopt(repsock,NN_SOL_SOCKET,NN_SNDTIMEO,&timeout,sizeof(timeout)); |
|
|
|
|
|
nn_setsockopt(dexsock,NN_SOL_SOCKET,NN_SNDTIMEO,&timeout,sizeof(timeout)); |
|
|
|
|
|
timeout = 10; |
|
|
nn_setsockopt(dexsock,NN_SOL_SOCKET,NN_RCVTIMEO,&timeout,sizeof(timeout)); |
|
|
nn_setsockopt(dexsock,NN_SOL_SOCKET,NN_RCVTIMEO,&timeout,sizeof(timeout)); |
|
|
timeout = 500; |
|
|
timeout = 500; |
|
|
nn_setsockopt(repsock,NN_SOL_SOCKET,NN_RCVTIMEO,&timeout,sizeof(timeout)); |
|
|
nn_setsockopt(repsock,NN_SOL_SOCKET,NN_RCVTIMEO,&timeout,sizeof(timeout)); |
|
@ -645,7 +646,7 @@ void dpow_nanomsginit(struct supernet_info *myinfo,char *ipaddr) |
|
|
} |
|
|
} |
|
|
myinfo->dpowipbits[0] = (uint32_t)calc_ipbits(myinfo->ipaddr); |
|
|
myinfo->dpowipbits[0] = (uint32_t)calc_ipbits(myinfo->ipaddr); |
|
|
myinfo->numdpowipbits = 1; |
|
|
myinfo->numdpowipbits = 1; |
|
|
timeout = 500; |
|
|
timeout = 10; |
|
|
nn_setsockopt(dpowsock,NN_SOL_SOCKET,NN_RCVTIMEO,&timeout,sizeof(timeout)); |
|
|
nn_setsockopt(dpowsock,NN_SOL_SOCKET,NN_RCVTIMEO,&timeout,sizeof(timeout)); |
|
|
maxsize = 1024 * 1024; |
|
|
maxsize = 1024 * 1024; |
|
|
printf("RCVBUF.%d\n",nn_setsockopt(dpowsock,NN_SOL_SOCKET,NN_RCVBUF,&maxsize,sizeof(maxsize))); |
|
|
printf("RCVBUF.%d\n",nn_setsockopt(dpowsock,NN_SOL_SOCKET,NN_RCVBUF,&maxsize,sizeof(maxsize))); |
|
@ -1245,7 +1246,7 @@ int32_t dpow_nanomsg_update(struct supernet_info *myinfo) |
|
|
dpow_datahandler(myinfo,dp,bp,np->senderind,np->channel,np->height,np->packet,np->datalen); |
|
|
dpow_datahandler(myinfo,dp,bp,np->senderind,np->channel,np->height,np->packet,np->datalen); |
|
|
} else printf("wrong senderind.%d\n",np->senderind); |
|
|
} else printf("wrong senderind.%d\n",np->senderind); |
|
|
} |
|
|
} |
|
|
} else printf("height.%d bp.%p state.%x senderind.%d\n",np->height,bp,bp!=0?bp->state:0,np->senderind); |
|
|
} //else printf("height.%d bp.%p state.%x senderind.%d\n",np->height,bp,bp!=0?bp->state:0,np->senderind);
|
|
|
//dp->crcs[firstz] = crc32;
|
|
|
//dp->crcs[firstz] = crc32;
|
|
|
} |
|
|
} |
|
|
} else printf("crc error from.%d %x vs %x or no dp.%p [%s]\n",np->senderind,crc32,np->crc32,dp,np->symbol); |
|
|
} else printf("crc error from.%d %x vs %x or no dp.%p [%s]\n",np->senderind,crc32,np->crc32,dp,np->symbol); |
|
|