From 2c38bf9e42da502a389d1637c53ab9ab2737d621 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 20 Jun 2017 00:10:10 +0300 Subject: [PATCH] Test --- iguana/exchanges/LP_network.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/iguana/exchanges/LP_network.c b/iguana/exchanges/LP_network.c index 0c7c4b60e..1b063d9ba 100644 --- a/iguana/exchanges/LP_network.c +++ b/iguana/exchanges/LP_network.c @@ -403,9 +403,15 @@ int32_t LP_initpublicaddr(uint16_t *mypullportp,char *publicaddr,char *myipaddr, { printf("bind to %s error for %s: %s\n",connectaddr,publicaddr,nn_strerror(nn_errno())); exit(-1); - } else printf("nntype.%d NN_SUB.%d to %s\n",nntype,NN_SUB,connectaddr); + } else printf("nntype.%d NN_SUB.%d connect to %s\n",nntype,NN_SUB,connectaddr); if ( nntype == NN_SUB ) nn_setsockopt(pullsock,NN_SUB,NN_SUB_SUBSCRIBE,"",0); + while ( 1 ) + { + int32_t size; void *buf; + if ( (size= nn_recv(pullsock,&buf,NN_MSG,0)) > 0 ) + printf("SUBPULL.(%s)\n",(char *)buf); + } } else {