diff options
author | Haskell Guy <haskell.guy@localhost> | 2020-05-26 13:07:50 +0200 |
---|---|---|
committer | Haskell Guy <haskell.guy@localhost> | 2020-05-26 13:37:29 +0200 |
commit | 41cde99ec6189dbecca6803a5aa4f6f18142e8ba (patch) | |
tree | 7a0ceab0d516b8c3b7b49313100ae50c97e875c3 /src/Ssb/Discovery.hs | |
download | ssb-haskell-41cde99ec6189dbecca6803a5aa4f6f18142e8ba.tar.xz |
initial commit
Diffstat (limited to 'src/Ssb/Discovery.hs')
-rw-r--r-- | src/Ssb/Discovery.hs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/Ssb/Discovery.hs b/src/Ssb/Discovery.hs new file mode 100644 index 0000000..352020e --- /dev/null +++ b/src/Ssb/Discovery.hs @@ -0,0 +1,22 @@ +-- | This module implements local discovery of Scuttlebutt peers. +-- +-- https://ssbc.github.io/scuttlebutt-protocol-guide/#discovery + +module Ssb.Discovery where + +import Protolude + +import Ssb.Network +import Ssb.Identity + +-- | default Scuttlebutt Server Port +defaultPort :: Port +defaultPort = "8008" + +-- | Advertisement messages are emitted on the local network for discovery of +-- peers. +data Advertisement = Advertisement + { ipAddress :: Host + , port :: Port + , publicKey :: PublicKey + } deriving (Eq) |