diff options
author | Loïc Hoguin <[email protected]> | 2013-11-25 15:02:42 +0100 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2013-11-25 15:02:42 +0100 |
commit | d2318c0a286daf51b4fe8afc5c6a232eee71ca72 (patch) | |
tree | 30a4e2cfa6f6d63c9068145eb82e9ec77c48ec2b /manual/ranch_tcp.md | |
parent | e4b3cf94ea41963fa0d65559e7ebb271bd96ba55 (diff) | |
download | ranch-d2318c0a286daf51b4fe8afc5c6a232eee71ca72.tar.gz ranch-d2318c0a286daf51b4fe8afc5c6a232eee71ca72.tar.bz2 ranch-d2318c0a286daf51b4fe8afc5c6a232eee71ca72.zip |
Add a manual
This is the manual for what is going to be in 1.0. It includes
two things that are not in the code yet: the shutdown option
and the accept_ack transport callback.
Diffstat (limited to 'manual/ranch_tcp.md')
-rw-r--r-- | manual/ranch_tcp.md | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/manual/ranch_tcp.md b/manual/ranch_tcp.md new file mode 100644 index 0000000..d0f6054 --- /dev/null +++ b/manual/ranch_tcp.md @@ -0,0 +1,47 @@ +ranch_tcp +========= + +The `ranch_tcp` module implements a TCP Ranch transport. + +Note that due to bugs in OTP up to at least R16B02, it is +recommended to disable async threads when using the +`sendfile` function of this transport, as it can make +the threads stuck indefinitely. + +Types +----- + +### opts() = [{backlog, non_neg_integer()} + | {ip, inet:ip_address()} + | {nodelay, boolean()} + | {port, inet:port_number()} + | {raw, non_neg_integer(), non_neg_integer(), non_neg_integer() | binary()}] + +> Listen options. +> +> This does not represent the entirety of the options that can +> be set on the socket, but only the options that should be +> set independently of protocol implementation. + +Option descriptions +------------------- + +None of the options are required. + +The default value is given next to the option name. + + - backlog (1024) + - Max length of the queue of pending connections. + - ip + - Interface to listen on. Listen on all interfaces by default. + - nodelay (true) + - Whether to enable TCP_NODELAY. + - port (0) + - TCP port number to listen on. 0 means a random port will be used. + +The `raw` option is unsupported. + +Exports +------- + +None. |