packages feed

stunclient 0.1.0.0 → 0.1.0.1

raw patch · 3 files changed

+7/−4 lines, 3 files

Files

+ changes.md view
@@ -0,0 +1,2 @@+# 1.0.0.1+* use send and recv rather than sendTo and recvFrom (fixes EISCONN on FreeBSD)
source/Network/Stun.hs view
@@ -108,11 +108,11 @@     liftIO $ S.connect s host     let go [] = liftIO (S.close s) >> throwError TimeOut         go (to:tos) = do-            _ <- liftIO $ SocketBS.sendTo s (encode msg) host-            r <- liftIO . timeout to $ SocketBS.recvFrom s 1024+            _ <- liftIO $ SocketBS.send s (encode msg)+            r <- liftIO . timeout to $ SocketBS.recv s 1024             case r of                 Nothing -> go tos-                Just (answer, _) -> return answer+                Just answer -> return answer     answer <- go $ if null timeOuts then [500000, 1000000, 2000000] else timeOuts     case decode answer of         Left _ -> throwError $ ProtocolError -- answer
stunclient.cabal view
@@ -1,5 +1,5 @@ name:                stunclient-version:             0.1.0.0+version:             0.1.0.1 synopsis:            RFC 5389: Session Traversal Utilities for NAT (STUN) client description:         RFC 5389: Session Traversal Utilities for NAT (STUN) client license:             MIT@@ -11,6 +11,7 @@ build-type:          Simple cabal-version:       >=1.8 bug-reports:         https://github.com/Philonous/hs-stun/issues+extra-source-files:  changes.md  library   exposed-modules:     Network.Stun