throwCConnectionFailed(strprintf("couldn't connect to server: %s (code %d)\n(makesureserverisrunningandyouareconnectingtothecorrectRPCport)", http_errorstring(response.error), response.error));
elseif(response.status==HTTP_UNAUTHORIZED)
if(response.status==0){
throwCConnectionFailed(strprintf("couldn't connect to server at port %d : %s (code %d)\n(make sure server is running and you are connecting to the correct RPC port)",
strUsage+=HelpMessageOpt("-rpcbind=<addr>",_("Bind to given address to listen for JSON-RPC connections. Use [host]:port notation for IPv6. This option can be specified multiple times (default: bind to all interfaces)"));
strUsage+=HelpMessageOpt("-rpcuser=<user>",_("Username for JSON-RPC connections"));
strUsage+=HelpMessageOpt("-rpcpassword=<pw>",_("Password for JSON-RPC connections"));
strUsage+=HelpMessageOpt("-rpcport=<port>",strprintf(_("Listen for JSON-RPC connections on <port> (default: %u or testnet: %u)"),7771,17771));
strUsage+=HelpMessageOpt("-rpcport=<port>",strprintf(_("Listen for JSON-RPC connections on <port> (default: %u or testnet: %u)"),ASSETCHAINS_RPCPORT,10000+ASSETCHAINS_RPCPORT));
strUsage+=HelpMessageOpt("-rpcallowip=<ip>",_("Allow JSON-RPC connections from specified source. Valid for <ip> are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times"));
strUsage+=HelpMessageOpt("-rpcthreads=<n>",strprintf(_("Set the number of threads to service RPC calls (default: %d)"),DEFAULT_HTTP_THREADS));
strUsage+=HelpMessageOpt("-metricsrefreshtime",strprintf(_("Number of seconds between metrics refreshes (default: %u if running in a console, %u otherwise)"),1,600));