]> git.rkrishnan.org Git - functorrent.git/blobdiff - src/Main.hs
more refactoring around infohash
[functorrent.git] / src / Main.hs
index bb50a8be38f4116ea46d67c976c6711dca086e6f..32dc41a83099fe89bb8442e7a8f5b2554c67b793 100644 (file)
@@ -37,7 +37,9 @@ main = do
             Nothing -> putStrLn "parse error"
             Just m -> do
               let len = MInfo.lengthInBytes (MInfo.info m)
-              body <- BC.pack <$> T.connect (MInfo.announce m) (T.prepareRequest d peerId len)
+                  (Benc.Bdict d') = d
+              body <- BC.pack <$> T.connect (MInfo.announce m) (T.prepareRequest d' peerId len)
               print (P.getPeers (P.getPeerResponse body))
+              print (BC.length (P.handShakeMsg d' peerId))
       Left e -> printError e
     putStrLn "done"