aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2011-08-11 09:46:39 +0200
committerLoïc Hoguin <[email protected]>2011-08-11 09:46:39 +0200
commitcd06efeba345fb941bb6ae8f8c6459c9d4c4f927 (patch)
treebc918a1390a4859f6dc48d04a4e2fa1bf2207026
parent43d14b52cd07dfd1121bbe6727a96dfd32304e47 (diff)
downloadcowboy-cd06efeba345fb941bb6ae8f8c6459c9d4c4f927.tar.gz
cowboy-cd06efeba345fb941bb6ae8f8c6459c9d4c4f927.tar.bz2
cowboy-cd06efeba345fb941bb6ae8f8c6459c9d4c4f927.zip
Add Transport:setopts/2 note for writing protocols
-rw-r--r--README.md5
1 files changed, 5 insertions, 0 deletions
diff --git a/README.md b/README.md
index 350ce44..5a4315f 100644
--- a/README.md
+++ b/README.md
@@ -229,6 +229,11 @@ After initializing your protocol, it is recommended to wait to receive a message
containing the atom 'shoot', as it will ensure Cowboy has been able to fully
initialize the socket. Anything you do past this point is up to you!
+If you need to change some socket options, like enabling raw mode for example,
+you can call the <em>Transport:setopts/2</em> function. It is the protocol's
+responsability to manage the socket usage, there should be no need for an user
+to specify that kind of options while starting a listener.
+
You should definitely look at the cowboy_http_protocol module for a great
example of fast request handling if you need to. Otherwise it's probably
safe to use `{active, once}` mode and handle everything as it comes.