From 8670f651135cbf446173840c1a6ac8f3e024a257 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Mon, 4 Jun 2018 11:30:53 +0200 Subject: Review and update the user guide --- doc/src/manual/gun.asciidoc | 2 +- doc/src/manual/gun.ws_send.asciidoc | 23 ++++++++++++----------- 2 files changed, 13 insertions(+), 12 deletions(-) (limited to 'doc/src/manual') diff --git a/doc/src/manual/gun.asciidoc b/doc/src/manual/gun.asciidoc index b15ce09..09f333f 100644 --- a/doc/src/manual/gun.asciidoc +++ b/doc/src/manual/gun.asciidoc @@ -46,7 +46,7 @@ Streams: Websocket: * link:man:gun:ws_upgrade(3)[gun:ws_upgrade(3)] - Upgrade to Websocket -* link:man:gun:ws_send(3)[gun:ws_send(3)] - Send one or more Websocket frame(s) +* link:man:gun:ws_send(3)[gun:ws_send(3)] - Send Websocket frames == Messages diff --git a/doc/src/manual/gun.ws_send.asciidoc b/doc/src/manual/gun.ws_send.asciidoc index 307cfae..fbb1025 100644 --- a/doc/src/manual/gun.ws_send.asciidoc +++ b/doc/src/manual/gun.ws_send.asciidoc @@ -2,7 +2,7 @@ == Name -gun:ws_send - Send one or more Websocket frame(s) +gun:ws_send - Send Websocket frames == Description @@ -17,7 +17,7 @@ Frame :: close | ping | pong | {close, non_neg_integer(), iodata()} ---- -Send one or more Websocket frame(s). +Send Websocket frames. The connection must first be upgraded to Websocket using the function link:man:gun:ws_upgrade(3)[gun:ws_upgrade(3)]. @@ -30,7 +30,8 @@ The pid of the Gun connection process. Frames:: -One or more Websocket frame(s). +A Websocket frame. +// @todo One or more Websocket frame(s). == Return value @@ -48,14 +49,14 @@ The atom `ok` is returned. gun:ws_send(ConnPid, {text, <<"Hello world!">>}). ---- -.Send many frames including a close frame -[source,erlang] ----- -gun:ws_send(ConnPid, [ - {text, <<"See you later, world!">>}, - close -]). ----- +//.Send many frames including a close frame +//[source,erlang] +//---- +//gun:ws_send(ConnPid, [ +// {text, <<"See you later, world!">>}, +// close +//]). +//---- == See also -- cgit v1.2.3