on 577fc17 help sign in
elk/libraries/WebSocket.elm
21 lines 684 B history raw
1module WebSocket where
2{-| A library for low latency HTTP communication. See the HTTP library for
3standard requests like GET, POST, etc. The API of this library is likely to
4change to make it more flexible.
6# Open a Connection
7@docs connect
8-}
10import Signal (Signal)
11import Native.WebSocket
13{-| Create a web-socket. The first argument is the URL of the desired
14web-socket server. The input signal holds the outgoing messages,
15and the resulting signal contains the incoming ones.
16-}
17connect : String -> Signal String -> Signal String
18connect = Native.WebSocket.connect
20-- data Action = Open String | Close String | Send String String
21-- connections : Signal Action -> Signal String