WSEvent
represents an event on a WebSocket connection.
Handlers receive one of these for each lifecycle event:
Connect: the connection was upgraded from HTTP
(Message msg): a text message arrived
(Binary data): a binary message arrived
Close: the peer requested a close
Binary
instantiate
(Fn [(Array Byte)] WSEvent)
creates a Binary.
Close
instantiate
(Fn [] WSEvent)
creates a Close.
Connect
instantiate
(Fn [] WSEvent)
creates a Connect.
Message
instantiate
(Fn [String] WSEvent)
creates a Message.
copy
instantiate
(Fn [(Ref WSEvent a)] WSEvent)
copies a WSEvent.
delete
instantiate
(Fn [WSEvent] ())
deletes a WSEvent. This should usually not be called manually.
get-tag
instantiate
(Fn [(Ref WSEvent a)] Int)
Gets the tag from a WSEvent.
prn
instantiate
(Fn [(Ref WSEvent a)] String)
converts a WSEvent to a string.
str
instantiate
(Fn [(Ref WSEvent a)] String)
converts a WSEvent to a string.