cabal-club / cabal-client

interface for writing peer-to-peer chat clients
GNU General Public License v3.0
95 stars 14 forks source link

read preferredPort from config, send to core #67

Closed cblgh closed 3 years ago

cblgh commented 3 years ago

this pr adds support for setting a custom port to listen for hyperswarm (i.e. find cabal peers) traffic on. it is related to https://github.com/cabal-club/cabal-core/pull/101 and https://github.com/cabal-club/cabal-core/issues/98

the port is set in the config object which is passed to cabal-client from client implementations

config: {
  temp: <boolean>,
  dbdir: <string, filepath to storage location>,
  preferredPort: <valid port number>
}