hplayground-0.1.2.8: monadic, reactive Formlets running in the Web browser

Safe HaskellNone
LanguageHaskell98

Haste.HPlay.WebSockets

Description

Hplayground WebSockets have de-inversion of control. it uses wsAsk for syncronous request-responses.

wsAsk can also handle asynchronous traffic too since it catches every received message, not only the next message

For an example, see http://tryplayg.herokuapp.com/try/hplay-sockets.hs/edit

Synopsis

Documentation

wsOpen :: URL -> Widget SockId Source

open the socket and continue the flow when it is opened.

wsAsk :: (JSType a, JSType b) => SockId -> a -> Widget b Source

syncronous request-responses. wsAsk can also handle asynchronous traffic too since it catches every received message, not only the next message and executes the rest of the computation as is usual in a active widget

wsClose :: SockId -> Widget () Source