From 2b588340af501825f3ab03f2e76dba0353c98fae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Mon, 4 Jun 2018 12:59:26 +0200 Subject: Update documentation for Gun 1.0 --- docs/en/gun/1.0/manual/gun.await_up/index.html | 241 +++++++++++++++++++++++++ 1 file changed, 241 insertions(+) create mode 100644 docs/en/gun/1.0/manual/gun.await_up/index.html (limited to 'docs/en/gun/1.0/manual/gun.await_up/index.html') diff --git a/docs/en/gun/1.0/manual/gun.await_up/index.html b/docs/en/gun/1.0/manual/gun.await_up/index.html new file mode 100644 index 00000000..dc3eea5c --- /dev/null +++ b/docs/en/gun/1.0/manual/gun.await_up/index.html @@ -0,0 +1,241 @@ + + + + + + + + + + Nine Nines: gun:await_up(3) + + + + + + + + + + + + + + + + +
+
+
+
+ +

gun:await_up(3)

+ +
+

Name

+
+

gun:await_up - Wait for the connection to be up

+
+
+
+

Description

+
+
+
+
await_up(ConnPid)
+    -> await_up(ConnPid, 5000, MonitorRef)
+
+await_up(ConnPid, MonitorRef)
+    -> await_up(ConnPid, 5000, MonitorRef)
+
+await_up(ConnPid, Timeout)
+    -> await_up(ConnPid, Timeout, MonitorRef)
+
+await_up(ConnPid, Timeout, MonitorRef)
+    -> {ok, Protocol} | {error, Reason}
+
+ConnPid    :: pid()
+MonitorRef :: reference()
+Timeout    :: timeout()
+Protocol   :: http | http2
+Reason     :: timeout | any()
+

Wait for the connection to be up.

+
+
+
+

Arguments

+
+
+
+ConnPid +
+
+

+The pid of the Gun connection process. +

+
+
+Timeout +
+
+

+How long to wait for, in milliseconds. +

+
+
+MonitorRef +
+
+

+Monitor for the Gun connection process. +

+

A monitor is automatically created for the duration of this +call when one is not provided.

+
+
+
+
+
+

Return value

+
+

The protocol selected for this connection. It can be used +to determine the capabilities of the server. Error tuples +may also be returned when a timeout or an error occur.

+
+
+
+

Changelog

+
+
    +
  • +

    +1.0: Function introduced. +

    +
  • +
+
+
+
+

Examples

+
+
+
Wait for the connection to be up
+
+
{ok, ConnPid} = gun:open("example.org", 443).
+{ok, _} = gun:await_up(ConnPid).
+
+
+ + + + + + +
+ +
+ + +

+ Gun + 1.0 + Function Reference + +

+ + + +

Navigation

+ +

Version select

+
    + + + +
  • 1.0
  • + +
+ +
+
+
+
+ + + + + + + + + -- cgit v1.2.3