Browse Source

Test

etomic
jl777 8 years ago
parent
commit
5064fc08aa
  1. 2
      iguana/exchanges/LP_nativeDEX.c
  2. 7
      iguana/exchanges/LP_network.c

2
iguana/exchanges/LP_nativeDEX.c

@ -312,7 +312,7 @@ int32_t LP_mainloop_iter(char *myipaddr,struct LP_peerinfo *mypeer,int32_t pubso
{
char keepalive[128];
sprintf(keepalive,"{\"method\":\"keepalive\"}");
printf("send keepalive to %s pullsock.%d\n",pushaddr,pullsock);
//printf("send keepalive to %s pullsock.%d\n",pushaddr,pullsock);
if ( LP_send(pullsock,keepalive,0) < 0 )
LP_deadman_switch = 0;
}

7
iguana/exchanges/LP_network.c

@ -109,8 +109,9 @@ void LP_psockloop(void *_ptr)
if ( size > 0 )
{
if ( (sentbytes= LP_send(sendsock,buf,0)) > 0 )
printf("PSOCKS (%d %d %d) (%s) -> %d/%d bytes %s\n",ptr->publicsock,ptr->sendsock,sendsock,(char *)buf,size,sentbytes,ptr->sendaddr);
else printf("send error to %s\n",ptr->sendaddr);
{
//printf("PSOCKS (%d %d %d) (%s) -> %d/%d bytes %s\n",ptr->publicsock,ptr->sendsock,sendsock,(char *)buf,size,sentbytes,ptr->sendaddr);
} else printf("send error to %s\n",ptr->sendaddr);
if ( buf != 0 )
{
if ( buf != keepalive )
@ -150,7 +151,7 @@ void LP_psockloop(void *_ptr)
{
ptr->lasttime = now;
sendsock = ptr->sendsock;
printf("[%s] -> sendsock.%d\n",(char *)buf,sendsock);
printf("keepalive.%u [%s] -> sendsock.%d\n",now,(char *)buf,sendsock);
break;
}
}

Loading…
Cancel
Save