2013-02-21 08:40:41 +00:00
|
|
|
-- A library for low latency HTTP communication. See the HTTP library for
|
|
|
|
-- standard requests like GET, POST, etc.
|
2013-02-20 22:36:16 +00:00
|
|
|
module WebSocket where
|
|
|
|
|
2013-07-26 17:05:48 +00:00
|
|
|
import Native.WebSocket as Native
|
2013-02-22 23:19:40 +00:00
|
|
|
|
2013-02-20 22:36:16 +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.
|
2013-05-21 09:04:38 +00:00
|
|
|
connect : String -> Signal String -> Signal String
|
2013-07-26 17:05:48 +00:00
|
|
|
connect = Native.connect
|
2013-04-15 01:07:26 +00:00
|
|
|
|
|
|
|
-- data Action = Open String | Close String | Send String String
|
|
|
|
-- connections : Signal Action -> Signal String
|