summaryrefslogtreecommitdiff
path: root/TCPProber.hs
diff options
context:
space:
mode:
Diffstat (limited to 'TCPProber.hs')
-rw-r--r--TCPProber.hs7
1 files changed, 4 insertions, 3 deletions
diff --git a/TCPProber.hs b/TCPProber.hs
index db6d0217..506ef142 100644
--- a/TCPProber.hs
+++ b/TCPProber.hs
@@ -145,7 +145,8 @@ runProbeQueue prober client maxjobs = do
145 labelThread t ("probe."++show ni) 145 labelThread t ("probe."++show ni)
146 loop 146 loop
147 147
148getNodes :: TCPProber -> TCP.TCPClient err () Nonce8 -> NodeId -> TCP.NodeInfo -> IO (Maybe ([TCP.NodeInfo],[TCP.NodeInfo],Maybe ())) 148
149getNodes :: TCPProber -> TCP.TCPClient err Nonce8 -> NodeId -> TCP.NodeInfo -> IO (Maybe ([TCP.NodeInfo],[TCP.NodeInfo],Maybe ()))
149getNodes prober tcp seeking dst = do 150getNodes prober tcp seeking dst = do
150 r <- TCP.getUDPNodes' tcp seeking (TCP.udpNodeInfo dst) 151 r <- TCP.getUDPNodes' tcp seeking (TCP.udpNodeInfo dst)
151 dput XTCP $ "Got via TCP nodes: " ++ show r 152 dput XTCP $ "Got via TCP nodes: " ++ show r
@@ -162,11 +163,11 @@ getNodes prober tcp seeking dst = do
162 return $ Just ts 163 return $ Just ts
163 return $ Just ts 164 return $ Just ts
164 165
165nodeSearch :: TCPProber -> TCP.TCPClient err () Nonce8 -> Search NodeId (IP, PortNumber) () TCP.NodeInfo TCP.NodeInfo 166nodeSearch :: TCPProber -> TCP.TCPClient err Nonce8 -> Search NodeId (IP, PortNumber) () TCP.NodeInfo TCP.NodeInfo
166nodeSearch prober tcp = Search 167nodeSearch prober tcp = Search
167 { searchSpace = TCP.tcpSpace 168 { searchSpace = TCP.tcpSpace
168 , searchNodeAddress = TCP.nodeIP &&& TCP.tcpPort 169 , searchNodeAddress = TCP.nodeIP &&& TCP.tcpPort
169 , searchQuery = getNodes prober tcp 170 , searchQuery = getNodes prober tcp
170 , searchAlpha = 8 171 , searchAlpha = 1
171 , searchK = 16 172 , searchK = 16
172 } 173 }