From 136d443b5c38bee96f5d995dfea3629ef07564c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Thu, 18 Jul 2019 09:59:28 +0200 Subject: Announce Ranch 2.0.0-rc.1 Adds Ranch 2.0 documentation and removes documentation for very old Cowboy and Ranch, along with Erlang.mk documentation which is available on its own website. --- docs/en/ranch/2.0/manual/ranch.get_addr/index.html | 197 +++++++++++++++++++++ 1 file changed, 197 insertions(+) create mode 100644 docs/en/ranch/2.0/manual/ranch.get_addr/index.html (limited to 'docs/en/ranch/2.0/manual/ranch.get_addr/index.html') diff --git a/docs/en/ranch/2.0/manual/ranch.get_addr/index.html b/docs/en/ranch/2.0/manual/ranch.get_addr/index.html new file mode 100644 index 00000000..e50c8ed2 --- /dev/null +++ b/docs/en/ranch/2.0/manual/ranch.get_addr/index.html @@ -0,0 +1,197 @@ + + + + + + + + + + Nine Nines: ranch:get_addr(3) + + + + + + + + + + + + + + + + +
+
+
+
+ +

ranch:get_addr(3)

+ +

Name

+

ranch:get_addr - Get the listening address

+

Description

+
+
get_addr(Ref :: ranch:ref())
+    -> {IP   :: inet:ip_address(),
+        Port :: inet:port_number()}
+     | {local, SocketFile :: binary()}
+     | {undefined, undefined}
+
+

Get the listening address.

+

Arguments

+
Ref
+

The listener name.

+
+
+

Return value

+

The address of the listener is returned as a tuple of the form {IP, Port} when listening on a network interface, or {local, SocketFile} when listening on a UNIX Domain socket. When the listener is suspended, {undefined, undefined} will be returned.

+

The IP address is the IP of the network interface the socket is bound to.

+

The socket file is the path of a file on your system the socket is bound to.

+

Examples

+
Get the listening port and IP
+
+
{IP, Port} = ranch:get_addr(example).
+
+
Get the listening UNIX Domain socket file
+
+
{local, SocketFile} = ranch:get_addr(example).
+
+

See also

+

ranch:start_listener(3), ranch:get_port(3), ranch:info(3), ranch(3)

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

+ Ranch + 2.0 + 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 BountySource. These funds are used to cover the recurring expenses like dedicated servers or domain names.

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