summaryrefslogtreecommitdiff
path: root/src/Network/Tox.hs
diff options
context:
space:
mode:
authorJoe Crayne <joe@jerkface.net>2018-12-12 02:01:39 -0500
committerJoe Crayne <joe@jerkface.net>2018-12-16 14:08:26 -0500
commitd96234b9954fb2e41521eb437edf2fee7317f7d6 (patch)
tree7a97ad1a7b4d01f1c9d74dcb93fae29d075bb76c /src/Network/Tox.hs
parent1819d80705986d36c3264f60d05a5383c73bc33f (diff)
TCP Prober.
Diffstat (limited to 'src/Network/Tox.hs')
-rw-r--r--src/Network/Tox.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Network/Tox.hs b/src/Network/Tox.hs
index ea9bbe56..d42f447d 100644
--- a/src/Network/Tox.hs
+++ b/src/Network/Tox.hs
@@ -65,6 +65,7 @@ import Network.Tox.ContactInfo
65import Text.XXD 65import Text.XXD
66import DPut 66import DPut
67import DebugTag 67import DebugTag
68import TCPProber
68import Network.Tox.Avahi 69import Network.Tox.Avahi
69import Network.Tox.Session 70import Network.Tox.Session
70import Network.Tox.Relay 71import Network.Tox.Relay
@@ -375,6 +376,10 @@ forkTox tox with_avahi = do
375 quitNC <- forkListener "toxCrypto" (toxCrypto tox) 376 quitNC <- forkListener "toxCrypto" (toxCrypto tox)
376 quitTCP <- forkListener "relay-client" (clientNet $ tcpClient $ tcpKademliaClient $ toxOnionRoutes tox) 377 quitTCP <- forkListener "relay-client" (clientNet $ tcpClient $ tcpKademliaClient $ toxOnionRoutes tox)
377 tcpKademlia <- forkPollForRefresh (tcpBucketRefresher $ toxOnionRoutes tox) 378 tcpKademlia <- forkPollForRefresh (tcpBucketRefresher $ toxOnionRoutes tox)
379 tcpprobe <- forkIO $ runProbeQueue (tcpProber $ toxOnionRoutes tox)
380 (tcpClient $ tcpKademliaClient $ toxOnionRoutes tox)
381 12
382 labelThread tcpprobe "tcp-probe"
378 quitAvahi <- if with_avahi then do 383 quitAvahi <- if with_avahi then do
379 forkPollForRefresh (DHT.refresher4 $ toxRouting tox) 384 forkPollForRefresh (DHT.refresher4 $ toxRouting tox)
380 forkPollForRefresh (DHT.refresher6 $ toxRouting tox) 385 forkPollForRefresh (DHT.refresher6 $ toxRouting tox)
@@ -392,6 +397,7 @@ forkTox tox with_avahi = do
392 quitOnion 397 quitOnion
393 quitTCP 398 quitTCP
394 killThread tcpKademlia 399 killThread tcpKademlia
400 killThread tcpprobe
395 quitToRoute 401 quitToRoute
396 quitHs 402 quitHs
397 , bootstrap (DHT.refresher4 $ toxRouting tox) 403 , bootstrap (DHT.refresher4 $ toxRouting tox)