diff options
Diffstat (limited to 'src/Network/Tox')
-rw-r--r-- | src/Network/Tox/TCP.hs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Network/Tox/TCP.hs b/src/Network/Tox/TCP.hs index c9c3d9a6..5b5b4f4e 100644 --- a/src/Network/Tox/TCP.hs +++ b/src/Network/Tox/TCP.hs | |||
@@ -173,6 +173,14 @@ handle2route o src dst = do | |||
173 | dput XMisc $ "TODO: handle2route " ++ show src | 173 | dput XMisc $ "TODO: handle2route " ++ show src |
174 | return Nothing | 174 | return Nothing |
175 | 175 | ||
176 | tcpPing :: Client err () Nonce8 addr RelayPacket -> addr -> IO (Maybe ()) | ||
177 | tcpPing client dst = sendQuery client meth () dst | ||
178 | where meth = MethodSerializer | ||
179 | { wrapQuery = \n8 src dst () -> RelayPing n8 | ||
180 | , unwrapResponse = \_ -> () | ||
181 | , methodTimeout = \n8 dst -> return (dst,5000000) | ||
182 | , method = () | ||
183 | } | ||
176 | 184 | ||
177 | newClient :: TransportCrypto -> IO (Client String () Nonce8 NodeInfo RelayPacket) | 185 | newClient :: TransportCrypto -> IO (Client String () Nonce8 NodeInfo RelayPacket) |
178 | newClient crypto = do | 186 | newClient crypto = do |