@@ -7,18 +7,17 @@
7-- Stability : released
7-- Stability : released
8-- Portability : GHC
8-- Portability : GHC
10−-- This module provides Array and stream based socket operations to connect to
10+-- This module provides socket based streaming APIs to to receive connections
11−-- remote hosts, to receive connections from remote hosts, and to read and
11+-- from remote hosts, and to read and write from and to network sockets.
12−-- write streams and arrays of bytes to and from network sockets.
14-- For basic socket types and operations please consult the @Network.Socket@
13-- For basic socket types and operations please consult the @Network.Socket@
15-- module of the <http://hackage.haskell.org/package/network network> package.
14-- module of the <http://hackage.haskell.org/package/network network> package.
17-- = Examples
16-- = Examples
19−-- To write a server, use the 'accept' unfold to start listening for
18+-- To write a server, use the 'acceptor' unfold to start listening for
20−-- connections from clients. 'accept' supplies a stream of connected sockets.
19+-- connections from clients. 'acceptor' generates a stream of connected
21−-- We can map an effectful action on this socket stream to handle the
20+-- sockets. We can map an effectful action on this socket stream to handle the
22-- connections. The action would typically use socket reading and writing
21-- connections. The action would typically use socket reading and writing
23-- operations to communicate with the remote host. We can read/write a stream
22-- operations to communicate with the remote host. We can read/write a stream
24-- of bytes or a stream of chunks of bytes ('Array').
23-- of bytes or a stream of chunks of bytes ('Array').
@@ -27,7 +26,6 @@
27-- this example can be written even more succinctly by using higher level
26-- this example can be written even more succinctly by using higher level
28-- operations from "Streamly.Network.Inet.TCP" module.
27-- operations from "Streamly.Network.Inet.TCP" module.
31-- >>> :set -XFlexibleContexts
29-- >>> :set -XFlexibleContexts
33-- >>> import Data.Function ((&))
31-- >>> import Data.Function ((&))
@@ -65,10 +63,10 @@
65-- Read IO requests to connected stream sockets are performed in chunks of
63-- Read IO requests to connected stream sockets are performed in chunks of
66-- 'Streamly.Internal.Data.Array.Unboxed.Type.defaultChunkSize'. Unless
64-- 'Streamly.Internal.Data.Array.Unboxed.Type.defaultChunkSize'. Unless
67-- specified otherwise in the API, writes are collected into chunks of
65-- specified otherwise in the API, writes are collected into chunks of
68−-- 'Streamly.Internal.Data.Array.Unboxed.Type.defaultChunkSize' before they are
66+-- 'Streamly.Internal.System.IO.defaultChunkSize' before they are written to
69−-- written to the socket. APIs are provided to control the chunking behavior.
67+-- the socket.
71−-- > import qualified Streamly.Network.Socket as Socket
69+-- >>> import qualified Streamly.Network.Socket as Socket
73-- = See Also
71-- = See Also