aboutsummaryrefslogtreecommitdiffstats
path: root/src/ranch.erl
AgeCommit message (Collapse)Author
2015-08-18Update the list of allowed transport optionsLoïc Hoguin
We are now up to date with regard to transport options we should accept for the listening socket. Documentation of existing options has been updated with regard to recent changes in the OTP docs and type specifications.
2015-08-17Don't pass Ranch-specific options down to transportsLoïc Hoguin
Should fix Dialyzer issues. The options are now also documented in the Ranch module, and there's new ranch:opt(), ranch_tcp:opt() and ranch_ssl:opt() for use in third party code.
2015-03-06Fix start_listener specLoïc Hoguin
2014-06-10Update copyright yearsLoïc Hoguin
2014-06-03Fix inherit listen options for accepted socketSlava Yurin
Order of options in listen is undocumented but significant. Now user option will replace default value if user set it.
2013-12-07Get rid of a ton of pointless commentsLoïc Hoguin
All of it can be found in the manual, which defines what the code must do, and is always up to date unlike the code comments.
2013-12-07Gracefully shutdown when stop_listener/1 is calledLoïc Hoguin
Implements the `shutdown` option as documented previously.
2013-11-26Add accept_ack on all transports and ack_timeout transport optionLoïc Hoguin
Doing this in the connection process allows us to free acceptors to start accepting more connections quicker, especially under load.
2013-11-25Small fixes to specsLoïc Hoguin
2013-05-16Fix typespecs for ranch:filter_options/3Loïc Hoguin
2013-05-16Add ranch:ref() typeLoïc Hoguin
2013-04-01Remove ranch_listener and replace ListenerPid by RefLoïc Hoguin
We just don't need this process anymore. Less, simpler code! API changes: * Protocols start_link first argument is now Ref instead of ListenerPid * ranch:accept_ack/1 argument is now Ref instead of ListenerPid * ranch_listener:remove_connection/1 becomes ranch:remove_connection/1 and its argument is now Ref instead of ListenerPid Ref is the name of the listener given as first argument to start_listener/6.
2013-01-15Allow raw socket options for TCP and SSLFred Hebert
This patch lets the user set and use raw socket options as described in inet:setopts/2 documentation. The raw options can be useful to use TCP features that are platform- specific and not supported in inet in general, such as TCP_DEFER_ACCEPT or TCP_LINGER2 in linux stacks, for example.
2012-12-24Improve max_connections typeLoïc Hoguin
It is non_neg_integer() | infinity. Introduce the type `ranch:max_conns/0` for easier manipulation.
2012-12-24Add ranch:set_max_connections/2 and get_max_connections/1Loïc Hoguin
2012-12-21Ensure transport module is loaded before checking exportsAndrew Majorov
Tests were constantly failing without this patch. It seems ct starts erlang code server in interactive mode, so application module loading is defered.
2012-12-20Add {socket, Socket} transport option, for accepting on existing socketsAndrew Thompson
2012-12-20Return {error, badarg} if start_listener got a bad transport moduleLoïc Hoguin
2012-08-20Add the 'ranch_transport' behaviourLoïc Hoguin
At the same time we make the 'port' option optional, defaulting to 0.
2012-07-25Introduce the ranch_server registry, make it handle listenersLoïc Hoguin
2012-07-22Add support for listening on random port numbers (port 0)Loïc Hoguin
ranch:get_port/1 returns the given listener's port.
2012-06-04Add Transport:connect/3 and remove types unneeded by R15B+0.2.1Loïc Hoguin
Also use one export per line to improve future diffs. Bump the version to 0.2.1 to reflect this change.
2012-04-14Import the acceptor code from CowboyLoïc Hoguin
Modules were renamed. The 'cowboy_' prefix became 'ranch_'. At the same time, ranch_ssl_transport became ranch_ssl, and ranch_tcp_transport became ranch_tcp, because appending '_transport' felt a bit redundant considering SSL and TCP clearly are transports. One test has been added to make sure everything is working.