summaryrefslogtreecommitdiff
path: root/src/Network/Tox/Crypto
diff options
context:
space:
mode:
Diffstat (limited to 'src/Network/Tox/Crypto')
-rw-r--r--src/Network/Tox/Crypto/Handlers.hs10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/Network/Tox/Crypto/Handlers.hs b/src/Network/Tox/Crypto/Handlers.hs
index e79b66fc..f59809fd 100644
--- a/src/Network/Tox/Crypto/Handlers.hs
+++ b/src/Network/Tox/Crypto/Handlers.hs
@@ -1047,10 +1047,16 @@ sendCrypto crypto session updateLocal cm = do
1047 PQ.OGEncodeFail -> return (Left "Failed to encode outgoing packet") 1047 PQ.OGEncodeFail -> return (Left "Failed to encode outgoing packet")
1048 1048
1049sendOnline :: TransportCrypto -> NetCryptoSession -> IO (Either String ()) 1049sendOnline :: TransportCrypto -> NetCryptoSession -> IO (Either String ())
1050sendOnline crypto session = sendCrypto crypto session (return ()) (OneByte ONLINE) 1050sendOnline crypto session = do
1051 let cm=OneByte ONLINE
1052 addMsgToLastN False (cm ^. messageType) session (Out cm)
1053 sendCrypto crypto session (return ()) (OneByte ONLINE)
1051 1054
1052sendOffline :: TransportCrypto -> NetCryptoSession -> IO (Either String ()) 1055sendOffline :: TransportCrypto -> NetCryptoSession -> IO (Either String ())
1053sendOffline crypto session = sendCrypto crypto session (return ()) (OneByte OFFLINE) 1056sendOffline crypto session = do
1057 let cm=OneByte OFFLINE
1058 addMsgToLastN False (cm ^. messageType) session (Out cm)
1059 sendCrypto crypto session (return ()) (OneByte OFFLINE)
1054 1060
1055 1061
1056sendKill :: TransportCrypto -> NetCryptoSession -> IO (Either String ()) 1062sendKill :: TransportCrypto -> NetCryptoSession -> IO (Either String ())