Copyright(c) digitally induced GmbH 2020
Safe HaskellNone

IHP.WebSocket

Description

 

Documentation

class WSApp state where Source #

Minimal complete definition

initialState

Methods

initialState :: state Source #

run :: (?state :: IORef state, ?requestContext :: RequestContext, ?applicationContext :: ApplicationContext, ?connection :: Connection) => IO () Source #

onPing :: (?state :: IORef state, ?requestContext :: RequestContext, ?applicationContext :: ApplicationContext, ?connection :: Connection) => IO () Source #

onClose :: (?state :: IORef state, ?requestContext :: RequestContext, ?applicationContext :: ApplicationContext, ?connection :: Connection) => IO () Source #

Instances

Instances details
WSApp AutoRefreshWSApp Source # 
Instance details

Defined in IHP.AutoRefresh

startWSApp :: forall state. (WSApp state, ?applicationContext :: ApplicationContext, ?requestContext :: RequestContext) => Connection -> IO () Source #

setState :: (?state :: IORef state) => state -> IO () Source #

getState :: (?state :: IORef state) => IO state Source #

receiveData :: (?connection :: Connection, WebSocketsData a) => IO a Source #

receiveDataMessage :: (?connection :: Connection) => IO DataMessage Source #

sendTextData :: (?connection :: Connection, WebSocketsData text) => text -> IO () Source #

Orphan instances

WebSocketsData UUID Source # 
Instance details

Methods

fromDataMessage :: DataMessage -> UUID

fromLazyByteString :: ByteString -> UUID

toLazyByteString :: UUID -> ByteString