Browse Source

Add default transport options section to listeners chapter

Loïc Hoguin 12 years ago
parent
commit
138b8d788c
2 changed files with 12 additions and 0 deletions
  1. 11 0
      guide/listeners.md
  2. 1 0
      guide/toc.md

+ 11 - 0
guide/listeners.md

@@ -81,6 +81,17 @@ telnet> quit
 Connection closed.
 ```
 
+Default transport options
+-------------------------
+
+By default the socket will be set to return `binary` data, with the
+options `{active, false}`, `{packet, raw}`, `{reuseaddr, true}` set.
+These values can't be overriden when starting the listener, but
+they can be overriden using `Transport:setopts/2` in the protocol.
+
+It will also set `{backlog, 1024}` and `{nodelay, true}`, which
+can be overriden at listener startup.
+
 Listening on a random port
 --------------------------
 

+ 1 - 0
guide/toc.md

@@ -7,6 +7,7 @@ Ranch User Guide
  *  [Listeners](listeners.md)
    *  Purpose
    *  Starting and stopping
+   *  Default transport options
    *  Listening on a random port
    *  Listening on privileged ports
    *  Accepting connections on an existing socket