1-- A concurrent TCP server that:
3-- * receives connections from clients
4-- * splits the incoming data into lines
5-- * lines from concurrent connections are merged into a single srteam
6-- * writes the line stream to an output file
8import System.Environment (getArgs)
12import qualified Streamly.FileSystem.File as File
13import qualified Streamly.Fold as FL
14import qualified Streamly.Mem.Array as A
15import qualified Streamly.Network.Socket as NS
16import qualified Streamly.Network.Server as NS
17import qualified Streamly.Prelude as S
21 file <- fmap head getArgs
23 $ encodeChar8Unchecked
25 $ S.concatMapBy parallel recv
26 $ NS.connectionsOnAllAddrs 8090
31 FL.splitSuffixBy' (== '\n') (A.toArrayN 1024)
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