summaryrefslogtreecommitdiff
path: root/src/Network/KRPC.hs
diff options
context:
space:
mode:
authorSam Truzjan <pxqr.sta@gmail.com>2013-10-01 06:10:41 +0400
committerSam Truzjan <pxqr.sta@gmail.com>2013-10-01 06:10:41 +0400
commit258f21eb490ee3588dd3a1c7316ff41f7f355be7 (patch)
treec4eae6e12cfa8ebb7553a5b75654ae6371684d57 /src/Network/KRPC.hs
parent4a0653fc58869f4fc61230d3d11ef92626a8f52d (diff)
Allow passing ipv6 addresses
Diffstat (limited to 'src/Network/KRPC.hs')
-rw-r--r--src/Network/KRPC.hs9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/Network/KRPC.hs b/src/Network/KRPC.hs
index e667853a..3c9f9bee 100644
--- a/src/Network/KRPC.hs
+++ b/src/Network/KRPC.hs
@@ -97,7 +97,8 @@
97module Network.KRPC 97module Network.KRPC
98 ( -- * Method 98 ( -- * Method
99 Method(..) 99 Method(..)
100 , method, idM 100 , method
101 , idM
101 102
102 -- * Client 103 -- * Client
103 , RemoteAddr 104 , RemoteAddr
@@ -349,11 +350,11 @@ infix 1 ==>@
349-- it will not create new thread for each connection. 350-- it will not create new thread for each connection.
350-- 351--
351server :: (MonadBaseControl IO remote, MonadIO remote) 352server :: (MonadBaseControl IO remote, MonadIO remote)
352 => PortNumber -- ^ Port used to accept incoming connections. 353 => KRemoteAddr -- ^ Port used to accept incoming connections.
353 -> [MethodHandler remote] -- ^ Method table. 354 -> [MethodHandler remote] -- ^ Method table.
354 -> remote () 355 -> remote ()
355server servport handlers = do 356server servAddr handlers = do
356 remoteServer servport $ \addr q -> do 357 remoteServer servAddr $ \addr q -> do
357 case dispatch (queryMethod q) of 358 case dispatch (queryMethod q) of
358 Nothing -> return $ Left $ MethodUnknown (queryMethod q) 359 Nothing -> return $ Left $ MethodUnknown (queryMethod q)
359 Just m -> m addr q 360 Just m -> m addr q