diff options
Diffstat (limited to 'Connection/Tcp.hs')
-rw-r--r-- | Connection/Tcp.hs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Connection/Tcp.hs b/Connection/Tcp.hs index 35083198..97b78eda 100644 --- a/Connection/Tcp.hs +++ b/Connection/Tcp.hs | |||
@@ -26,7 +26,7 @@ module Connection.Tcp | |||
26 | 26 | ||
27 | import Data.ByteString (ByteString,hGetNonBlocking) | 27 | import Data.ByteString (ByteString,hGetNonBlocking) |
28 | import qualified Data.ByteString.Char8 as S -- ( hPutStrLn, hPutStr, pack) | 28 | import qualified Data.ByteString.Char8 as S -- ( hPutStrLn, hPutStr, pack) |
29 | import Data.Conduit ( Source, Sink, Flush ) | 29 | import Data.Conduit ( ConduitT, Void, Flush ) |
30 | #if MIN_VERSION_containers(0,5,0) | 30 | #if MIN_VERSION_containers(0,5,0) |
31 | import qualified Data.Map.Strict as Map | 31 | import qualified Data.Map.Strict as Map |
32 | import Data.Map.Strict (Map) | 32 | import Data.Map.Strict (Map) |
@@ -168,7 +168,7 @@ data InOrOut = In | Out | |||
168 | -- | These events may be read from 'serverEvent' TChannel. | 168 | -- | These events may be read from 'serverEvent' TChannel. |
169 | -- | 169 | -- |
170 | data ConnectionEvent b | 170 | data ConnectionEvent b |
171 | = Connection (STM Bool) (Source IO b) (Sink (Flush b) IO ()) | 171 | = Connection (STM Bool) (ConduitT () b IO ()) (ConduitT (Flush b) Void IO ()) |
172 | -- ^ A new connection was established | 172 | -- ^ A new connection was established |
173 | | ConnectFailure SockAddr | 173 | | ConnectFailure SockAddr |
174 | -- ^ A 'Connect' command failed. | 174 | -- ^ A 'Connect' command failed. |
@@ -249,7 +249,7 @@ server :: | |||
249 | -- forall (m :: * -> *) a u conkey releaseKey. | 249 | -- forall (m :: * -> *) a u conkey releaseKey. |
250 | (Show conkey, MonadIO m, Ord conkey) => | 250 | (Show conkey, MonadIO m, Ord conkey) => |
251 | Allocate releaseKey m | 251 | Allocate releaseKey m |
252 | -> ( IO (Maybe ByteString) -> (ByteString -> IO Bool) -> ( Source IO x, Sink (Flush x) IO () ) ) | 252 | -> ( IO (Maybe ByteString) -> (ByteString -> IO Bool) -> ( ConduitT () x IO (), ConduitT (Flush x) Void IO () ) ) |
253 | -> m (Server conkey u releaseKey x) | 253 | -> m (Server conkey u releaseKey x) |
254 | server allocate sessionConduits = do | 254 | server allocate sessionConduits = do |
255 | (key,cmds) <- allocate (atomically newEmptyTMVar) | 255 | (key,cmds) <- allocate (atomically newEmptyTMVar) |
@@ -438,7 +438,7 @@ socketFamily (SockAddrInet6 _ _ _ _) = AF_INET6 | |||
438 | socketFamily (SockAddrUnix _) = AF_UNIX | 438 | socketFamily (SockAddrUnix _) = AF_UNIX |
439 | 439 | ||
440 | 440 | ||
441 | conevent :: ( IO (Maybe ByteString) -> (ByteString -> IO Bool) -> ( Source IO x, Sink (Flush x) IO () ) ) | 441 | conevent :: ( IO (Maybe ByteString) -> (ByteString -> IO Bool) -> ( ConduitT () x IO (), ConduitT (Flush x) Void IO () ) ) |
442 | -> ConnectionState | 442 | -> ConnectionState |
443 | -> ConnectionEvent x | 443 | -> ConnectionEvent x |
444 | conevent sessionConduits con = Connection pingflag read write | 444 | conevent sessionConduits con = Connection pingflag read write |
@@ -448,7 +448,7 @@ conevent sessionConduits con = Connection pingflag read write | |||
448 | 448 | ||
449 | newConnection :: Ord a | 449 | newConnection :: Ord a |
450 | => Server a u1 releaseKey x | 450 | => Server a u1 releaseKey x |
451 | -> ( IO (Maybe ByteString) -> (ByteString -> IO Bool) -> ( Source IO x, Sink (Flush x) IO () ) ) | 451 | -> ( IO (Maybe ByteString) -> (ByteString -> IO Bool) -> ( ConduitT () x IO (), ConduitT (Flush x) Void IO () ) ) |
452 | -> ConnectionParameters conkey u | 452 | -> ConnectionParameters conkey u |
453 | -> a | 453 | -> a |
454 | -> u1 | 454 | -> u1 |