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 to and from
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.
18-- Read IO requests to connected stream sockets are performed in chunks of
19-- 32KiB, this is referred to as @defaultChunkSize@ in the documentation. One
20-- IO request may or may not read the full chunk. Unless specified otherwise
21-- in the API, writes are collected into chunks of @defaultChunkSize@ before
22-- they are written to the socket. APIs are provided to control the chunking
23-- and framing behavior.
25-- > import qualified Streamly.Network.Socket as SK
28-- By design, connected socket IO APIs are similar to
29-- "Streamly.Memory.Array" read write APIs. They are almost identical to the
30-- sequential streaming APIs in "Streamly.Internal.FileSystem.File".
32module Streamly.Network.Socket
34 -- * Socket Specification
37 -- * Accept Connections
66 -- reading/writing datagrams
70import Streamly.Internal.Network.Socket
71import 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