From 48f39402181d959cad88cb3f460210c007169f50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Wed, 12 May 2021 11:13:47 +0200 Subject: Cowboy 2.9.0 --- .../cowboy/2.9/manual/cowboy_req.sock/index.html | 199 +++++++++++++++++++++ 1 file changed, 199 insertions(+) create mode 100644 docs/en/cowboy/2.9/manual/cowboy_req.sock/index.html (limited to 'docs/en/cowboy/2.9/manual/cowboy_req.sock/index.html') diff --git a/docs/en/cowboy/2.9/manual/cowboy_req.sock/index.html b/docs/en/cowboy/2.9/manual/cowboy_req.sock/index.html new file mode 100644 index 00000000..dfe3ae65 --- /dev/null +++ b/docs/en/cowboy/2.9/manual/cowboy_req.sock/index.html @@ -0,0 +1,199 @@ + + + + + + + + + + Nine Nines: cowboy_req:sock(3) + + + + + + + + + + + + + + + + +
+
+
+
+ +

cowboy_req:sock(3)

+ +

Name

+

cowboy_req:sock - Socket address and port

+

Description

+
+
sock(Req :: cowboy_req:req()) -> Info
+
+Info :: {inet:ip_address(), inet:port_number()}
+
+

Return the socket's IP address and port number.

+

The socket information can also be obtained using pattern matching:

+
+
#{sock := {IP, Port}} = Req.
+
+

Arguments

+
Req
+

The Req object.

+
+
+

Return value

+

The socket's local IP address and port number.

+

Changelog

+
  • 2.1: Function introduced. +
  • +
+

Examples

+
Get the socket's IP address and port number.
+
+
{IP, Port} = cowboy_req:sock(Req).
+
+

See also

+

cowboy_req(3), cowboy_req:peer(3), cowboy_req:cert(3)

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

+ Cowboy + 2.9 + 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