elm/libraries/WebSocket.elm

22 lines
707 B
Elm
Raw Permalink Normal View History

module WebSocket where
2013-09-12 19:55:43 +00:00
{-| A library for low latency HTTP communication. See the HTTP library for
2013-09-12 20:10:22 +00:00
standard requests like GET, POST, etc. The API of this library is likely to
change to make it more flexible.
# Open a Connection
@docs connect
2013-09-12 19:55:43 +00:00
-}
import Signal (Signal)
import Basics (String)
import Native.WebSocket
2013-09-12 19:55:43 +00:00
{-| Create a web-socket. The first argument is the URL of the desired
web-socket server. The input signal holds the outgoing messages,
and the resulting signal contains the incoming ones.
-}
connect : String -> Signal String -> Signal String
connect = Native.WebSocket.connect
2013-04-15 01:07:26 +00:00
-- data Action = Open String | Close String | Send String String
-- connections : Signal Action -> Signal String