diff options
Diffstat (limited to 'src/Network/BitTorrent/Exchange.hs')
-rw-r--r-- | src/Network/BitTorrent/Exchange.hs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/Network/BitTorrent/Exchange.hs b/src/Network/BitTorrent/Exchange.hs index 2d0393c0..862611f9 100644 --- a/src/Network/BitTorrent/Exchange.hs +++ b/src/Network/BitTorrent/Exchange.hs | |||
@@ -102,7 +102,7 @@ runSession se addr p2p = | |||
102 | isIOException _ = return () | 102 | isIOException _ = return () |
103 | 103 | ||
104 | -- | Run P2P session in the current thread. Normally you don't need this | 104 | -- | Run P2P session in the current thread. Normally you don't need this |
105 | -- function in client application. | 105 | -- function in client application, except for debugging. |
106 | runP2P :: SwarmSession -> PeerAddr -> P2P () -> IO () | 106 | runP2P :: SwarmSession -> PeerAddr -> P2P () -> IO () |
107 | runP2P se addr p2p = waitVacancy se $ runSession se addr p2p | 107 | runP2P se addr p2p = waitVacancy se $ runSession se addr p2p |
108 | 108 | ||
@@ -115,6 +115,13 @@ spawnP2P se addr p2p = do | |||
115 | forkIO $ do | 115 | forkIO $ do |
116 | runSession se addr p2p `finally` leaveSwarm se | 116 | runSession se addr p2p `finally` leaveSwarm se |
117 | 117 | ||
118 | -- TODO unify this all using PeerConnection | ||
119 | {- | ||
120 | listenP2P :: SwarmSession -> P2P () -> IO PortNumber | ||
121 | listenP2P _ _ = undefined | ||
122 | |||
123 | chainP2P :: SwarmSession -> PeerConnection -> P2P () -> IO () | ||
124 | -} | ||
118 | {----------------------------------------------------------------------- | 125 | {----------------------------------------------------------------------- |
119 | Exceptions | 126 | Exceptions |
120 | -----------------------------------------------------------------------} | 127 | -----------------------------------------------------------------------} |