Safe Haskell | None |
---|
- data PendingConnection = PendingConnection {}
- acceptRequest :: PendingConnection -> IO Connection
- rejectRequest :: PendingConnection -> ByteString -> IO ()
- data Connection = Connection {
- connectionOptions :: ConnectionOptions
- connectionType :: ConnectionType
- connectionProtocol :: Protocol
- connectionIn :: InputStream Message
- connectionOut :: OutputStream Message
- data ConnectionOptions = ConnectionOptions {
- connectionOnPong :: IO ()
- defaultConnectionOptions :: ConnectionOptions
- receive :: Connection -> IO Message
- receiveDataMessage :: Connection -> IO DataMessage
- receiveData :: WebSocketsData a => Connection -> IO a
- send :: Connection -> Message -> IO ()
- sendDataMessage :: Connection -> DataMessage -> IO ()
- sendTextData :: WebSocketsData a => Connection -> a -> IO ()
- sendBinaryData :: WebSocketsData a => Connection -> a -> IO ()
- sendClose :: WebSocketsData a => Connection -> a -> IO ()
- sendPing :: WebSocketsData a => Connection -> a -> IO ()
Documentation
data PendingConnection Source
A new client connected to the server. We haven't accepted the connection yet, though.
PendingConnection | |
|
rejectRequest :: PendingConnection -> ByteString -> IO ()Source
data Connection Source
Connection | |
|
receive :: Connection -> IO MessageSource
receiveDataMessage :: Connection -> IO DataMessageSource
Receive an application message. Automatically respond to control messages.
receiveData :: WebSocketsData a => Connection -> IO aSource
Receive a message, converting it to whatever format is needed.
send :: Connection -> Message -> IO ()Source
sendDataMessage :: Connection -> DataMessage -> IO ()Source
Send a DataMessage
sendTextData :: WebSocketsData a => Connection -> a -> IO ()Source
Send a message as text
sendBinaryData :: WebSocketsData a => Connection -> a -> IO ()Source
Send a message as binary data
sendClose :: WebSocketsData a => Connection -> a -> IO ()Source
Send a friendly close message
sendPing :: WebSocketsData a => Connection -> a -> IO ()Source
Send a ping