on 4bec310 help sign in
elk/libraries/WebSocket.elm
22 lines 707 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 Basics (String)
12import Native.WebSocket
14{-| Create a web-socket. The first argument is the URL of the desired
15web-socket server. The input signal holds the outgoing messages,
16and the resulting signal contains the incoming ones.
17-}
18connect : String -> Signal String -> Signal String
19connect = Native.WebSocket.connect
21-- data Action = Open String | Close String | Send String String
22-- connections : Signal Action -> Signal String