pipes-network-ws-0.1: WebSockets support for pipes.

Safe HaskellNone
LanguageHaskell98

Pipes.Network.WS

Description

This module offers tools to stream from and to WebSocket Connections using Pipes.

See the network-simple-wss, network-simple-ws or and websockets libraries as well, for lower level support.

Synopsis

Documentation

fromConnection Source #

Arguments

:: MonadIO m 
=> Connection 
-> Producer' ByteString m () 

Receives bytes from the remote end and sends them downstream.

The obtailed ByteStrings are never empty.

This producer returns when the conection is closed gracefully.

toConnection Source #

Arguments

:: MonadIO m 
=> Connection 
-> Consumer' ByteString m () 

Send bytes from upstream to the remote end.