summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJames Crayne <jim.crayne@gmail.com>2017-11-21 01:27:45 +0000
committerJames Crayne <jim.crayne@gmail.com>2017-11-21 01:27:45 +0000
commitc1d033886f9d0b7038bc453795f043d1e97f94b2 (patch)
tree5fa1ca88fc3be0aaaca9af6f2d8a3bfdfae223ec /src
parent1b0d23964cc86a29f60f96346a359ef4e31c1b5c (diff)
Use the addNewSessionHook, rename announceToxConnection
Diffstat (limited to 'src')
-rw-r--r--src/Network/Tox.hs7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/Network/Tox.hs b/src/Network/Tox.hs
index 5b30a7e6..1567ef1a 100644
--- a/src/Network/Tox.hs
+++ b/src/Network/Tox.hs
@@ -299,13 +299,8 @@ newTox :: TVar Onion.AnnouncedKeys -- ^ Store of announced keys we are a rende
299 -> SockAddr -- ^ Bind-address to listen on. 299 -> SockAddr -- ^ Bind-address to listen on.
300 -> Maybe NetCryptoSessions -- ^ State of all one-on-one Tox links. 300 -> Maybe NetCryptoSessions -- ^ State of all one-on-one Tox links.
301 -> Maybe SecretKey -- ^ Optional DHT secret key to use. 301 -> Maybe SecretKey -- ^ Optional DHT secret key to use.
302 -> ( SockAddr -- ^ Address of remote peer.
303 -> STM Bool -- ^ True if connection requires a ping.
304 -> Source IO CryptoMessage -- ^ Inbound packets.
305 -> Sink (Flush CryptoMessage) IO () -- ^ Outbound packets.
306 -> IO () ) -- ^ Action to invoke on new connections.
307 -> IO Tox 302 -> IO Tox
308newTox keydb addr mbSessionsState suppliedDHTKey announceConnection = do 303newTox keydb addr mbSessionsState suppliedDHTKey = do
309 udp <- {- addVerbosity <$> -} udpTransport addr 304 udp <- {- addVerbosity <$> -} udpTransport addr
310 (crypto0,sessionsState) <- case mbSessionsState of 305 (crypto0,sessionsState) <- case mbSessionsState of
311 Nothing -> do 306 Nothing -> do