Accept addr

To start receiving JSON-RPC requests, we'll need to configure a JSON-RPC accept address.

We'll add a rpc_listen address to our Args struct. It will look like this:

#[derive(Clone, Debug, Deserialize, StructOpt, StructOptToml)]
#[structopt(name = "dchat", about = cli_desc!())]
struct Args {
    #[structopt(long, default_value = "tcp://")]
    /// RPC server listen address
    rpc_listen: Url,

    #[structopt(short, long)]
    /// Configuration file to use
    config: Option<String>,

    #[structopt(short, long)]
    /// Set log file to ouput into
    log: Option<String>,

    #[structopt(short, parse(from_occurrences))]
    /// Increase verbosity (-vvv supported)
    verbose: u8,

    /// P2P network settings
    net: SettingsOpt,

This encodes a default rpc_listen address on the port 51054. To be able to modify the default, we can also add rpc_listen to the default config at ../dchatd_config.toml as follows:

# dchat toml

## RPC listen address. 
rpc_listen =["tcp://"]

## P2P accept addresses Required for inbound nodes.

## P2P external addresses. Required for inbound nodes.

## Seed nodes to connect to. Required for inbound and outbound nodes.

## Outbound connect slots. Required for outbound nodes.
outbound_connections = 5

Regenerate the config by deleting the previous one, rebuilding and rerunning dchatd. Now the rpc_listen address can be modified any time by editing the config file.