diff options
author | Joe Crayne <joe@jerkface.net> | 2020-01-17 17:40:51 -0500 |
---|---|---|
committer | Joe Crayne <joe@jerkface.net> | 2020-01-17 17:41:07 -0500 |
commit | ebacfa8f8cbd8b5cc3a1995188cc2cc8c260d76e (patch) | |
tree | ee1da2e7110edbda15dff6356ab693bd50ccc519 /dht/src | |
parent | daeaa4fd91bce1626d126628a2f04d7653c8069a (diff) |
Improved TCP-mediated handshake protocol.
Diffstat (limited to 'dht/src')
-rw-r--r-- | dht/src/Network/Tox/TCP.hs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/dht/src/Network/Tox/TCP.hs b/dht/src/Network/Tox/TCP.hs index ebb15e3b..27a0f3d6 100644 --- a/dht/src/Network/Tox/TCP.hs +++ b/dht/src/Network/Tox/TCP.hs | |||
@@ -333,6 +333,11 @@ tcpPing client dst = do | |||
333 | , method = PingPacket | 333 | , method = PingPacket |
334 | } | 334 | } |
335 | 335 | ||
336 | sendConnectionRequest :: Client err PacketNumber tid addr (Bool, RelayPacket) | ||
337 | -> PublicKey -> addr -> IO () | ||
338 | sendConnectionRequest client pubkey ni = | ||
339 | sendMessage (clientNet client) ni (True,RoutingRequest pubkey) | ||
340 | |||
336 | tcpConnectionRequest_ :: Client err PacketNumber tid addr (Bool, RelayPacket) | 341 | tcpConnectionRequest_ :: Client err PacketNumber tid addr (Bool, RelayPacket) |
337 | -> PublicKey -> addr -> IO (Maybe ConId) | 342 | -> PublicKey -> addr -> IO (Maybe ConId) |
338 | tcpConnectionRequest_ client pubkey ni = do | 343 | tcpConnectionRequest_ client pubkey ni = do |