Browse Source

Test

etomic
jl777 8 years ago
parent
commit
7a111abcbc
  1. 6
      iguana/exchanges/LP_commands.c
  2. 2
      iguana/exchanges/message

6
iguana/exchanges/LP_commands.c

@ -56,6 +56,11 @@ char *stats_JSON(void *ctx,char *myipaddr,int32_t pubsock,double profitmargin,cJ
//printf("got hello from %s:%u\n",ipaddr!=0?ipaddr:"",argport);
return(0);
}
else if ( strcmp(method,"message") == 0 )
{
printf("got message.(%s) from %s:%u\n",jprint(argjson,0),ipaddr!=0?ipaddr:"",argport);
return(0);
}
else if ( strcmp(method,"nn_tests") == 0 )
return(clonestr("{\"result\":\"success\"}"));
else if ( strcmp(method,"help") == 0 )
@ -83,6 +88,7 @@ trust(pubkey, trust)\n\
register(pubkey,pushaddr)\n\
registerall(numnodes)\n\
lookup(pubkey)\n\
message(pubkey,<argjson>)\n\
forward(pubkey,method2,<argjson>)\n\
forward(pubkey,method2=publish,<argjson>)\n\
forwardhex(pubkey,hex)\n\

2
iguana/exchanges/message

@ -0,0 +1,2 @@
source userpass
curl --url "http://127.0.0.1:7779" --data "{\"userpass\":\"$userpass\",\"pubkey\":\"$1\",\"method\":\"forward\",\"method2\":\"message\",\"message\":\"some sort of message\"}"
Loading…
Cancel
Save