From 8459bebceb9533948193774371cbd9fd571b78ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Wed, 16 Oct 2019 09:48:31 +0200 Subject: Cowboy 2.7.0 --- docs/en/gun/1.2/guide/connect/index.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'docs/en/gun/1.2/guide/connect/index.html') diff --git a/docs/en/gun/1.2/guide/connect/index.html b/docs/en/gun/1.2/guide/connect/index.html index 8b7dc3cd..b754a69f 100644 --- a/docs/en/gun/1.2/guide/connect/index.html +++ b/docs/en/gun/1.2/guide/connect/index.html @@ -71,7 +71,7 @@

Opening a new connection

The gun:open/2,3 function must be used to open a connection.

Opening a connection to example.org on port 443
-
@@ -82,7 +82,7 @@ http://www.gnu.org/software/src-highlite -->

The transport and protocol used can be overriden via options. The manual documents all available options.

Options can be provided as a third argument, and take the form of a map.

Opening a TLS connection to example.org on port 8443
-
@@ -92,7 +92,7 @@ http://www.gnu.org/software/src-highlite -->

When Gun successfully connects to the server, it sends a gun_up message with the protocol that has been selected for the connection.

Gun provides the functions gun:await_up/1,2,3 that wait for the gun_up message. They can optionally take a monitor reference and/or timeout value. If no monitor is provided, one will be created for the duration of the function call.

Synchronous opening of a connection
-
@@ -107,7 +107,7 @@ http://www.gnu.org/software/src-highlite -->

Gun leaves you the choice as to which one will be used. However, if you use the gun:await/2,3 or gun:await_body/2,3 functions, a monitor may be used for you to avoid getting stuck waiting for a message that will never come.

If you choose to monitor yourself you can do it on a permanent basis rather than on every message you will receive, saving resources. Indeed, the gun:await/3,4 and gun:await_body/3,4 functions both accept a monitor argument if you have one already.

Monitoring the connection process
-
@@ -116,7 +116,7 @@ http://www.gnu.org/software/src-highlite -->

This monitor reference can be kept and used until the connection process exits.

Handling `DOWN` messages
-
@@ -131,7 +131,7 @@ http://www.gnu.org/software/src-highlite -->

Closing the connection abruptly

The connection can be stopped abruptly at any time by calling the gun:close/1 function.

Immediate closing of the connection
-
-- cgit v1.2.3