1-- A TCP client that does the following:
2-- * Reads multiple filenames passed on the command line
3-- * Opens as many concurrent connections to the server
4-- * Sends all the files concurrently to the server
7import System.IO (openFile, IOMode(..), hClose)
8import System.Environment (getArgs)
11import qualified Streamly.Prelude as S
12import qualified Streamly.FileSystem.File as File
13import qualified Streamly.Network.Socket as NS
16main = getArgs >>= S.drain . parallely . S.mapM sendFile . S.fromList
21 h <- openFile file ReadMode
22 openConnection >>= \sk -> do
23 S.drain $ NS.writeArrays sk $ File.readArrays h
28 sock <- socket AF_INET Stream defaultProtocol
29 connect sock $ SockAddrInet 8090 (tupleToHostAddress (127,0,0,1))
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