summaryrefslogtreecommitdiff
path: root/src/Network/BitTorrent/Exchange.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Network/BitTorrent/Exchange.hs')
-rw-r--r--src/Network/BitTorrent/Exchange.hs13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/Network/BitTorrent/Exchange.hs b/src/Network/BitTorrent/Exchange.hs
index 9f119d13..b0a94853 100644
--- a/src/Network/BitTorrent/Exchange.hs
+++ b/src/Network/BitTorrent/Exchange.hs
@@ -79,7 +79,8 @@ import Control.Monad.Trans.Resource
79 79
80import Data.IORef 80import Data.IORef
81import Data.Conduit as C 81import Data.Conduit as C
82import Data.Conduit.Cereal 82import Data.Conduit.Cereal as S
83import Data.Conduit.Serialization.Binary as B
83import Data.Conduit.Network 84import Data.Conduit.Network
84import Data.Serialize as S 85import Data.Serialize as S
85import Text.PrettyPrint as PP hiding (($$)) 86import Text.PrettyPrint as PP hiding (($$))
@@ -103,10 +104,12 @@ type PeerWire = ConduitM Message Message IO
103 104
104runPeerWire :: Socket -> PeerWire () -> IO () 105runPeerWire :: Socket -> PeerWire () -> IO ()
105runPeerWire sock p2p = 106runPeerWire sock p2p =
106 sourceSocket sock $= 107 sourceSocket sock $=
107 conduitGet S.get $= 108 S.conduitGet S.get $=
108 p2p $= 109-- B.conduitDecode $=
109 conduitPut S.put $$ 110 p2p $=
111 S.conduitPut S.put $$
112-- B.conduitEncode $$
110 sinkSocket sock 113 sinkSocket sock
111 114
112awaitMessage :: P2P Message 115awaitMessage :: P2P Message