blob: babfce061cf9e592a3d2b7e32f9e6f93c253fb94 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
{-# LANGUAGE ExistentialQuantification #-}
module Announcer where
import Network.Kademlia.Search
data Announcer = Announcer
forkAnnouncer :: IO Announcer
forkAnnouncer = return Announcer
stopAnnouncer :: Announcer -> IO ()
stopAnnouncer _ = return ()
data AnnounceMethod ni = forall nid addr r tok a. AnnounceMethod
{ aSearch :: Search nid addr tok ni r
, aPublish :: (r,tok) -> Maybe ni -> IO (Maybe a)
}
schedule :: Announcer -> AnnounceMethod ni -> info -> IO ()
schedule _ _ _ = return ()
cancel :: Announcer -> AnnounceMethod ni -> info -> IO ()
cancel _ _ _ = return ()
|