diff options
Diffstat (limited to 'src/Network/KRPC.hs')
-rw-r--r-- | src/Network/KRPC.hs | 9 |
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 @@ | |||
97 | module Network.KRPC | 97 | module 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 | -- |
351 | server :: (MonadBaseControl IO remote, MonadIO remote) | 352 | server :: (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 () |
355 | server servport handlers = do | 356 | server 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 |