chiark / gitweb /
pkstream/pkstream.c: Allow multiple listening and peer addresses.
authorMark Wooding <mdw@distorted.org.uk>
Wed, 27 Sep 2017 23:38:58 +0000 (00:38 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sat, 16 Jun 2018 18:14:10 +0000 (19:14 +0100)
commit5c8525cb2bbe784c14014e72ad7a63d6afecea1c
tree791bd5653aa08feacb7da71a44e0a767cb1a782d
parentb31421b948a5510d4529ff6e6d2579135c517634
pkstream/pkstream.c: Allow multiple listening and peer addresses.

When being a TCP server.

  * Accept multiple `-b' and `-p' options, and accumulate their values
    into string vectors;

  * expand the `connwait' addresses into vectors;

  * when resolving addresses, accumulate the addresses into the
    appropriate result vectors;

  * maintain multiple `sel_file' objects waiting for their respective
    listening sockets;

  * and search the vector of peers when accepting incoming
    connections (an empty vector means that all remote addresses are
    permitted, so we no longer need to dig into the address structure
    here).
pkstream/pkstream.c