diff options
Diffstat (limited to 'portal/lib/portal_ws.ml')
-rw-r--r-- | portal/lib/portal_ws.ml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/portal/lib/portal_ws.ml b/portal/lib/portal_ws.ml index 5377ed9..fbdced7 100644 --- a/portal/lib/portal_ws.ml +++ b/portal/lib/portal_ws.ml @@ -14,7 +14,6 @@ let ws_endpoint (domain : string) = this constructor (Node.js), there should be some sort of polyfill. Lastly, if [domain] doesn't provide a well-formed Web-host Metadata file, the function throws an exception. *) - let+ host_meta = Js_of_ocaml_lwt.XmlHttpRequest.perform_raw_url (well_known_of domain) in let i = Xmlm.make_input (`String (0, host_meta.content)) (* This ugly function extracts the href element from a Link tag's attributes if it's a websocket. *) @@ -37,7 +36,8 @@ let ws_endpoint (domain : string) = | None -> failwith (domain ^ "doesn't advertise a WebSocket endpoint via Web-host Metadata.") let ws_stream (url : string) = - (** [ws_stream url] returns a stream (and its push function) that talk with the websocket located at [url]. + (** [ws_stream url] returns an Lwt stream (and its push function) communicating with the websocket located at [url] + using the XMPP protocol. Pushing [None] closes the websocket. |