Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
3d7cd0916c
  1. 4
      iguana/SuperNET.c
  2. 3
      iguana/SuperNET.h

4
iguana/SuperNET.c

@ -448,6 +448,10 @@ void SuperNET_init(struct supernet_info *myinfo,uint16_t PUBport,uint16_t LBport
sendtimeout = 100;
recvtimeout = 1000;
myinfo->PUBpoint[0] = myinfo->LBpoint[0] = 0;
if ( PUBport == 0 )
PUBport = SUPERNET_PUBPORT;
if ( LBport == 0 )
LBport = SUPERNET_LBPORT;
if ( (myinfo->PUBport= PUBport) != 0 )
{
myinfo->PUBsock = nn_createsocket(myinfo,myinfo->PUBpoint,1,"NN_PUB",NN_PUB,myinfo->PUBport,sendtimeout,recvtimeout);

3
iguana/SuperNET.h

@ -20,7 +20,8 @@
#include "../includes/cJSON.h"
#include "../includes/nanomsg/nn.h"
#define SUPERNET_PORT 7776
#define SUPERNET_LBPORT 7776
#define SUPERNET_PUBPORT 7775
#define SUPERNET_NETWORKTIMEOUT 10000
#define SUPERNET_POLLTIMEOUT 1
#define SUPERNET_APIUSLEEP (SUPERNET_POLLTIMEOUT * 10000)

Loading…
Cancel
Save