2-- Module : Streamly.Network.Socket
3-- Copyright : (c) 2018 Composewell Technologies
6-- Maintainer : streamly@composewell.com
7-- Stability : experimental
10-- A socket is a handle to a protocol endpoint.
12-- This module provides APIs to read and write streams and arrays from and to
13-- network sockets. Sockets may be connected or unconnected. Connected sockets
14-- can only send or recv data to/from the connected endpoint, therefore, APIs
15-- for connected sockets do not need to explicitly specify the remote endpoint.
16-- APIs for unconnected sockets need to explicitly specify the remote endpoint.
20-- Read IO requests to connected stream sockets are performed in chunks of
21-- 'Streamly.Internal.Memory.Array.Types.defaultChunkSize'. Unless specified
22-- otherwise in the API, writes are collected into chunks of
23-- 'Streamly.Internal.Memory.Array.Types.defaultChunkSize' before they are
24-- written to the socket. APIs are provided to control the chunking behavior.
26-- > import qualified Streamly.Network.Socket as SK
28-- For additional, experimental APIs take a look at
29-- "Streamly.Internal.Network.Socket" module.
31-- By design, connected socket IO APIs are similar to
32-- "Streamly.Memory.Array" read write APIs. They are almost identical to the
33-- sequential streaming APIs in "Streamly.Internal.FileSystem.File".
35module Streamly.Network.Socket
37 -- * Socket Specification
40 -- * Accept Connections
47 , readChunksWithBufferOf
56import Streamly.Internal.Network.Socket
57import Prelude hiding (read)
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