diff options
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) |