on da346ea help sign in
elk/libraries/WebSocket.elm
14 lines 557 B history raw
1-- A library for low latency HTTP communication. See the HTTP library for
2-- standard requests like GET, POST, etc.
3module WebSocket where
5import Native.WebSocket as Native
7-- Create a web-socket. The first argument is the URL of the desired
8-- web-socket server. The input signal holds the outgoing messages,
9-- and the resulting signal contains the incoming ones.
10connect : String -> Signal String -> Signal String
11connect = Native.connect
13-- data Action = Open String | Close String | Send String String
14-- connections : Signal Action -> Signal String