Browse Source

Test

etomic
jl777 8 years ago
parent
commit
506bb45b48
  1. 4
      iguana/exchanges/LP_network.c

4
iguana/exchanges/LP_network.c

@ -300,7 +300,7 @@ char *LP_psock(char *myipaddr,int32_t ispaired)
pullsock = pubsock = -1; pullsock = pubsock = -1;
nanomsg_transportname(1,pushaddr,myipaddr,publicport); nanomsg_transportname(1,pushaddr,myipaddr,publicport);
nanomsg_transportname(1,subaddr,myipaddr,subport); nanomsg_transportname(1,subaddr,myipaddr,subport);
if ( (pullsock= nn_socket(AF_SP,ispaired!=0?NN_PAIR:NN_PULL)) >= 0 && (pubsock= nn_socket(AF_SP,ispaired!=0?NN_PAIR:NN_PAIR)) >= 0 ) if ( (pullsock= nn_socket(AF_SP,ispaired!=0?NN_PAIR:NN_PULL)) >= 0 && (pubsock= nn_socket(AF_SP,ispaired!=0?NN_PAIR:NN_BUS)) >= 0 )
{ {
if ( nn_bind(pullsock,pushaddr) >= 0 && nn_bind(pubsock,subaddr) >= 0 ) if ( nn_bind(pullsock,pushaddr) >= 0 && nn_bind(pubsock,subaddr) >= 0 )
{ {
@ -389,7 +389,7 @@ int32_t LP_initpublicaddr(uint16_t *mypullportp,char *publicaddr,char *myipaddr,
{ {
if ( LP_canbind != 0 ) if ( LP_canbind != 0 )
nntype = LP_COMMAND_RECVSOCK; nntype = LP_COMMAND_RECVSOCK;
else nntype = NN_PAIR;//NN_SUB; else nntype = NN_BUS;//NN_SUB;
} else nntype = NN_PAIR; } else nntype = NN_PAIR;
if ( LP_canbind != 0 ) if ( LP_canbind != 0 )
{ {

Loading…
Cancel
Save