import FuncTorrent.Tracker.Types (TState(..), TrackerEventState(..), TrackerProtocol(..), TrackerMsg(..))
import FuncTorrent.Utils (Port, toPort, getHostname)
import qualified FuncTorrent.FileSystem as FS (MsgChannel)
-import FuncTorrent.Peer (Peer)
+import FuncTorrent.PeerMsgs (Peer)
type MsgChannel = Chan TrackerMsg
return ()
Udp -> do
_ <- forkIO $ UT.trackerLoop turl (fromIntegral port) peerId infohash fsChan initialTState
+ runStateT (msgHandler msgChannel) initialTState
return ()
_ ->
error "Tracker Protocol unimplemented"