aboutsummaryrefslogtreecommitdiffstats
path: root/doc/src/manual/ranch_transport.asciidoc
diff options
context:
space:
mode:
authorjuhlig <[email protected]>2019-05-21 09:21:34 +0200
committerLoïc Hoguin <[email protected]>2019-05-22 13:53:43 +0200
commit5fe188abc31eae9a516c71dee61fa51633378c5c (patch)
treed8bdf571948f221b7729db2212ede660f4e1a6e8 /doc/src/manual/ranch_transport.asciidoc
parent95b53ec7247ad68ed4cb2425b396377312ea3dee (diff)
downloadranch-5fe188abc31eae9a516c71dee61fa51633378c5c.tar.gz
ranch-5fe188abc31eae9a516c71dee61fa51633378c5c.tar.bz2
ranch-5fe188abc31eae9a516c71dee61fa51633378c5c.zip
Add docs for local sockets
Diffstat (limited to 'doc/src/manual/ranch_transport.asciidoc')
-rw-r--r--doc/src/manual/ranch_transport.asciidoc9
1 files changed, 8 insertions, 1 deletions
diff --git a/doc/src/manual/ranch_transport.asciidoc b/doc/src/manual/ranch_transport.asciidoc
index b7ec6d2..2d59e82 100644
--- a/doc/src/manual/ranch_transport.asciidoc
+++ b/doc/src/manual/ranch_transport.asciidoc
@@ -138,12 +138,16 @@ Return the name of the transport.
----
peername(Socket :: socket())
-> {ok, {inet:ip_address(), inet:port_number()}}
- | {error, atom()}.
+ | {local, binary()} | {error, atom()}.
----
Return the address and port number for the other end of
the connection.
+For UNIX Domain sockets the return value will be
+`{local, PeerSocket}`, with `PeerSocket` typically
+an empty binary.
+
=== recv
[source,erlang]
@@ -250,6 +254,9 @@ sockname(Socket :: socket())
Return the address and port number for the local end
of the connection.
+For UNIX Domain sockets the return value will be
+`{local, SocketFile}`.
+
== Exports
The following function can be used when implementing