From 5e05fe8e7877ffd6bc473b77b8ca0a12ad26bd67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Thu, 14 Mar 2024 16:23:56 +0100 Subject: Cowboy 2.12, Cowlib 2.13, Gun 2.1 --- docs/en/gun/2.1/manual/gun.info/index.html | 215 +++++++++++++++++++++++++++++ 1 file changed, 215 insertions(+) create mode 100644 docs/en/gun/2.1/manual/gun.info/index.html (limited to 'docs/en/gun/2.1/manual/gun.info/index.html') diff --git a/docs/en/gun/2.1/manual/gun.info/index.html b/docs/en/gun/2.1/manual/gun.info/index.html new file mode 100644 index 00000000..b93a1820 --- /dev/null +++ b/docs/en/gun/2.1/manual/gun.info/index.html @@ -0,0 +1,215 @@ + + + + + + + + + + Nine Nines: gun:info(3) + + + + + + + + + + + + + + + +
+
+
+
+ +

gun:info(3)

+ +

Name

+

gun:info - Obtain information about the connection

+

Description

+
+
info(ConnPid) -> Info
+
+ConnPid :: pid()
+Info :: #{
+    owner          => pid(),
+    socket         => inet:socket() | ssl:sslsocket(),
+    transport      => tcp | tls,
+    protocol       => http | http2 | socks | ws,
+    sock_ip        => inet:ip_address(),
+    sock_port      => inet:port_number(),
+    origin_scheme  => binary() | undefined,
+    origin_host    => inet:hostname() | inet:ip_address(),
+    origin_port    => inet:port_number(),
+    intermediaries => [Intermediary],
+    cookie_store   => gun_cookies:cookie_store()
+}
+Intermediary :: #{
+    type      => connect | socks5,
+    host      => inet:hostname() | inet:ip_address(),
+    port      => inet:port_number(),
+    transport => tcp | tls,
+    protocol  => http | http2 | socks | raw
+}
+
+

Obtain information about the connection.

+

Arguments

+
ConnPid
+

The pid of the Gun connection process.

+
+
+

Return value

+

A map is returned containing various informations about the connection.

+

Changelog

+
  • 2.0: The values owner, origin_scheme and cookie_store were added. +
  • +
  • 1.3: The values socket, transport, protocol, origin_host, origin_port and intermediaries were added. +
  • +
  • 1.0: Function introduced. +
  • +
+

Examples

+
Obtain information about the connection
+
+
Info = gun:info(ConnPid).
+
+

See also

+

gun(3), gun:open(3), gun:open_unix(3)

+ + + + + + +
+ +
+ + +

+ Gun + 2.1 + Function Reference + +

+ + + +

Navigation

+ +

Version select

+ + +

Like my work? Donate!

+

Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:

+
+ + + + + + + + + +

Recurring payment options are also available via GitHub Sponsors. These funds are used to cover the recurring expenses like food, dedicated servers or domain names.

+ + + +
+
+
+
+ + + + + + + + + -- cgit v1.2.3