From 7d61b485e47e247d7ecac500c83a902ab934f569 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Mon, 16 Nov 2020 16:12:55 +0100 Subject: Update documentation --- docs/en/gun/2.0/guide/websocket/index.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'docs/en/gun/2.0/guide/websocket/index.html') diff --git a/docs/en/gun/2.0/guide/websocket/index.html b/docs/en/gun/2.0/guide/websocket/index.html index 2d6b8c9c..b407ad4e 100644 --- a/docs/en/gun/2.0/guide/websocket/index.html +++ b/docs/en/gun/2.0/guide/websocket/index.html @@ -91,7 +91,7 @@ http://www.gnu.org/software/src-highlite --> by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite --> -
gun:ws_upgrade(ConnPid, "/websocket", []
+
StreamRef = gun:ws_upgrade(ConnPid, "/websocket", []
     #{protocols => [{<<"xmpp">>, gun_ws_h}]}).

The upgrade will fail if the server cannot satisfy the protocol negotiation.

@@ -115,20 +115,20 @@ http://www.gnu.org/software/src-highlite -->

Sending data

Once the Websocket upgrade has completed successfully, you no longer have access to functions for performing requests. You can only send and receive Websocket messages.

-

Use gun:ws_send/2 to send messages to the server.

+

Use gun:ws_send/3 to send messages to the server.

Send a text frame
-
gun:ws_send(ConnPid, {text, "Hello!"}).
+
gun:ws_send(ConnPid, StreamRef, {text, "Hello!"}).
Send a text frame, a binary frame and then close the connection
-
gun:ws_send(ConnPid, [
+
gun:ws_send(ConnPid, StreamRef, [
     {text, "Hello!"},
     {binary, BinaryValue},
     close
@@ -165,8 +165,8 @@ http://www.gnu.org/software/src-highlite -->
 			
 
 			
-				
-					Migrating from Gun 1.3 to 2.0
+				
+					Internals: TLS over TLS
 				
 			
 		
-- 
cgit v1.2.3