@@ -7,18 +7,17 @@
77-- Stability : released
88-- Portability : GHC
99--
10−-- This module provides Array and stream based socket operations to connect to
11−-- remote hosts, to receive connections from remote hosts, and to read and
12−-- write streams and arrays of bytes to and from network sockets.
10+-- This module provides socket based streaming APIs to to receive connections
11+-- from remote hosts, and to read and write from and to network sockets.
1312--
1413-- For basic socket types and operations please consult the @Network.Socket@
1514-- module of the <http://hackage.haskell.org/package/network network> package.
1615--
1716-- = Examples
1817--
19−-- To write a server, use the 'accept' unfold to start listening for
20−-- connections from clients. 'accept' supplies a stream of connected sockets.
21−-- We can map an effectful action on this socket stream to handle the
18+-- To write a server, use the 'acceptor' unfold to start listening for
19+-- connections from clients. 'acceptor' generates a stream of connected
20+-- sockets. We can map an effectful action on this socket stream to handle the
2221-- connections. The action would typically use socket reading and writing
2322-- operations to communicate with the remote host. We can read/write a stream
2423-- of bytes or a stream of chunks of bytes ('Array').
@@ -27,7 +26,6 @@
2726-- this example can be written even more succinctly by using higher level
2827-- operations from "Streamly.Network.Inet.TCP" module.
2928--
30−--
3129-- >>> :set -XFlexibleContexts
3230-- >>>
3331-- >>> import Data.Function ((&))
@@ -65,10 +63,10 @@
6563-- Read IO requests to connected stream sockets are performed in chunks of
6664-- 'Streamly.Internal.Data.Array.Unboxed.Type.defaultChunkSize'. Unless
6765-- specified otherwise in the API, writes are collected into chunks of
68−-- 'Streamly.Internal.Data.Array.Unboxed.Type.defaultChunkSize' before they are
69−-- written to the socket. APIs are provided to control the chunking behavior.
66+-- 'Streamly.Internal.System.IO.defaultChunkSize' before they are written to
67+-- the socket.
7068--
71−-- > import qualified Streamly.Network.Socket as Socket
69+-- >>> import qualified Streamly.Network.Socket as Socket
7270--
7371-- = See Also
7472--