1--------------------------------------------------------------------------------
2{-# LANGUAGE ScopedTypeVariables #-}
3module Network.WebSockets
4    ( -- * Incoming connections and handshaking
5      PendingConnection
6    , pendingRequest
7    , acceptRequest
8    , AcceptRequest(..)
9    , defaultAcceptRequest
10    , acceptRequestWith
11    , rejectRequest
12    , RejectRequest(..)
13    , defaultRejectRequest
14    , rejectRequestWith
15
16      -- * Main connection type
17    , Connection
18
19      -- * Options for connections
20    , ConnectionOptions (..)
21    , defaultConnectionOptions
22
23      -- ** Compression options
24    , CompressionOptions (..)
25    , PermessageDeflate (..)
26    , defaultPermessageDeflate
27
28      -- ** Protection limits
29    , SizeLimit (..)
30
31      -- * Sending and receiving messages
32    , receive
33    , receiveDataMessage
34    , receiveData
35    , send
36    , sendDataMessage
37    , sendDataMessages
38    , sendTextData
39    , sendTextDatas
40    , sendBinaryData
41    , sendBinaryDatas
42    , sendClose
43    , sendCloseCode
44    , sendPing
45
46      -- * HTTP Types
47    , Headers
48    , Request (..)
49    , RequestHead (..)
50    , getRequestSubprotocols
51    , Response (..)
52    , ResponseHead (..)
53
54      -- * WebSocket message types
55    , Message (..)
56    , ControlMessage (..)
57    , DataMessage (..)
58    , WebSocketsData (..)
59
60      -- * Exceptions
61    , HandshakeException (..)
62    , ConnectionException (..)
63
64      -- * Running a standalone server
65    , ServerApp
66    , runServer
67    , runServerWith
68    , ServerOptions (..)
69    , defaultServerOptions
70    , runServerWithOptions
71
72      -- * Utilities for writing your own server
73    , makeListenSocket
74    , makePendingConnection
75    , makePendingConnectionFromStream
76
77      -- * Running a client
78    , ClientApp
79    , runClient
80    , runClientWith
81    , runClientWithSocket
82    , runClientWithStream
83    , newClientConnection
84
85      -- * Utilities
86    , withPingThread
87    , forkPingThread
88    ) where
89
90
91--------------------------------------------------------------------------------
92import           Network.WebSockets.Client
93import           Network.WebSockets.Connection
94import           Network.WebSockets.Http
95import           Network.WebSockets.Server
96import           Network.WebSockets.Types
97