summaryrefslogtreecommitdiff
path: root/src/Erebos/ICE.chs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Erebos/ICE.chs')
-rw-r--r--src/Erebos/ICE.chs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Erebos/ICE.chs b/src/Erebos/ICE.chs
index 2c6f500..dceeb2c 100644
--- a/src/Erebos/ICE.chs
+++ b/src/Erebos/ICE.chs
@@ -8,6 +8,7 @@ module Erebos.ICE (
IceRemoteInfo,
iceCreateConfig,
+ iceStopThread,
iceCreateSession,
iceDestroy,
iceRemoteInfo,
@@ -139,6 +140,12 @@ iceCreateConfig stun turn =
then return Nothing
else Just . IceConfig <$> newForeignPtr ice_cfg_free cfg
+foreign import ccall unsafe "pjproject.h ice_cfg_stop_thread"
+ ice_cfg_stop_thread :: Ptr PjIceStransCfg -> IO ()
+
+iceStopThread :: IceConfig -> IO ()
+iceStopThread (IceConfig fcfg) = withForeignPtr fcfg ice_cfg_stop_thread
+
{#pointer *pj_ice_strans as ^ #}
iceCreateSession :: IceConfig -> IceSessionRole -> (IceSession -> IO ()) -> IO IceSession