on cd8ade6 help sign in
elk/libraries/WebSocket.elm
16 lines 603 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 Signal (Signal)
6import Basics (String)
7import Native.WebSocket
9-- Create a web-socket. The first argument is the URL of the desired
10-- web-socket server. The input signal holds the outgoing messages,
11-- and the resulting signal contains the incoming ones.
12connect : String -> Signal String -> Signal String
13connect = Native.WebSocket.connect
15-- data Action = Open String | Close String | Send String String
16-- connections : Signal Action -> Signal String