2-- Module : Streamly.Network.Server
3-- Copyright : (c) 2019 Composewell Technologies
6-- Maintainer : streamly@composewell.com
10-- Combinators to build Inet/TCP clients and servers.
12-- >>> import qualified Streamly.Network.Inet.TCP as TCP
15module Streamly.Network.Inet.TCP
17 -- * Accept Connections
23 -- * Connect to Servers
27 -- XXX Expose this as a pipe when we have pipes.
33 -- These abstractions can be applied to any setting where we need to do a
34 -- sink processing of multiple streams e.g. output from multiple processes
35 -- or data coming from multiple files.
37 -- handle connections concurrently using a specified fold
38 -- , handleConnections
40 -- handle frames concurrently using a specified fold
43 -- merge frames from all connection into a single stream. Frames can be
44 -- created by a specified fold.
58import Control.Monad.IO.Class (MonadIO(..))
59import Data.Word (Word8)
60import Network.Socket (Socket, PortNumber)
61import Streamly.Internal.Data.Unfold.Type (Unfold(..))
63import Streamly.Internal.Network.Inet.TCP
64 hiding (acceptOnAddr, acceptOnPort, acceptOnPortLocal)
66{-# DEPRECATED acceptOnAddr "Please use 'acceptorOnAddr' instead" #-}
67{-# INLINE acceptOnAddr #-}
70 => Unfold m ((Word8, Word8, Word8, Word8), PortNumber) Socket
71acceptOnAddr = acceptorOnAddr
73{-# DEPRECATED acceptOnPort "Please use 'acceptorOnPort' instead" #-}
74{-# INLINE acceptOnPort #-}
75acceptOnPort :: MonadIO m => Unfold m PortNumber Socket
76acceptOnPort = acceptorOnPort
78{-# DEPRECATED acceptOnPortLocal "Please use 'acceptorOnPortLocal' instead" #-}
79{-# INLINE acceptOnPortLocal #-}
80acceptOnPortLocal :: MonadIO m => Unfold m PortNumber Socket
81acceptOnPortLocal = acceptorOnPortLocal
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list