aboutsummaryrefslogtreecommitdiffstats
path: root/doc/src/guide
diff options
context:
space:
mode:
Diffstat (limited to 'doc/src/guide')
-rw-r--r--doc/src/guide/connect.asciidoc24
1 files changed, 16 insertions, 8 deletions
diff --git a/doc/src/guide/connect.asciidoc b/doc/src/guide/connect.asciidoc
index e1ad56e..e2bcaa7 100644
--- a/doc/src/guide/connect.asciidoc
+++ b/doc/src/guide/connect.asciidoc
@@ -33,16 +33,24 @@ The `gun:open/{2,3}` function must be used to open a connection.
[source,erlang]
{ok, ConnPid} = gun:open("example.org", 443).
-@todo open/3
-@todo make opts a map
+If the port given is 443, Gun will attempt to connect using
+SSL. The protocol will be selected automatically using the
+NPN extension for TLS. By default Gun supports SPDY/3.1,
+SPDY/3 and HTTP/1.1 when connecting using SSL.
-If the port given is 80, Gun will attempt to connect using
-TCP and use the HTTP/1.1 protocol. For any other port, TLS
-will be used. The NPN extension for TLS allows Gun to select
-SPDY automatically if the server supports it. Otherwise,
-HTTP/1.1 will be used.
+For any other port, Gun will attempt to connect using TCP
+and will use the HTTP/1.1 protocol.
-@todo more about defaults
+The transport and protocol used can be overriden using
+options. The manual documents all available options.
+
+Options can be provided as a third argument, and take the
+form of a map.
+
+.Opening an SSL connection to example.org on port 8443
+
+[source,erlang]
+{ok, ConnPid} = gun:open("example.org", 8443, #{transport=>ssl}).
=== Monitoring the connection process