on master help sign in
update overview documentation
commitcc2229e0ac0bf854b8ad1b0ac1d8b8149c0d184f authorHarendra Kumar <harendra.kumar@gmail.com> dateSun 13 Oct 2019, 21:59 (7 years ago) parent1a60915
1 file changed+17−9
src/Streamly/Network/Socket.hs+17−9
src/Streamly/Network/Socket.hs+17−9
@@ -7,20 +7,28 @@
77-- Stability : experimental
88-- Portability : GHC
99--
10−-- Read and write streams and arrays to and from network sockets. Socket IO
11−-- APIs are quite similar to "Streamly.Memory.Array" read write APIs and almost
12−-- identical to the sequential streaming APIs in "Streamly.Internal.FileSystem.File".
10+-- A socket is a handle to a protocol endpoint.
1311--
14−-- Read IO requests to the socket are performed in chunks of 32KiB, this is
15−-- referred to as @defaultChunkSize@ in the documentation. One IO request may
16−-- or may not read the full chunk. Unless specified otherwise in the API,
17−-- writes are collected into chunks of @defaultChunkSize@ before they are
18−-- written to the socket. APIs are provided to control the chunking and
19−-- framing behavior.
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.
17+--
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.
2024--
2125-- > import qualified Streamly.Network.Socket as SK
2226--
2327
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".
31+--
2432module Streamly.Network.Socket
2533 (
2634 -- * Read from connection