aboutsummaryrefslogtreecommitdiffstats
path: root/src/ranch_transport.erl
AgeCommit message (Collapse)Author
2021-09-08Update copyright yearsLoïc Hoguin
2021-09-08Update copyrightJan Uhlig
2020-06-25Update copyrightjuhlig
2020-04-20Delete local socket file when a listener closesjuhlig
2019-10-14Enable multiple steps handshakejuhlig
Also fix some Protocol:start_link/4 into start_link/3 left over in the documentation.
2019-05-27Use transport options in ranch_transport:listen/1 callbacksjuhlig
The callback `ranch_transport:listen/1` has changed to accept a map of transport options instead of socket options.
2019-05-18Add support for UNIX domain socketsjuhlig
It was working already but the types were wrong and some small details needed to be corrected.
2019-05-13Add the passive messages to ranch_transport:messages/0Loïc Hoguin
2018-10-23Add ranch:recv_proxy_header/2Loïc Hoguin
This is the function that should be called regardless of TCP or TLS being used. The proper usage for this function is: {ok, ProxyInfo} = ranch:recv_proxy_header(Ref, Timeout), {ok, Socket} = ranch:handshake(Ref), ... Ranch takes care of everything else under the hood. Transports now need to have a Transport:recv_proxy_header/2 function. For ranch_ssl the function gets the port from the sslsocket() record and then calls ranch_tcp:recv_proxy_header/2 with it. This means that two undocumented features are currently used for this, but the interface is really nice so that's a sacrifice worth doing. Also worth noting is that OTP 22 should have an alternative for gen_tcp:unrecv/2 so the only real issue is about the sslsocket() record at the moment.
2018-07-31Correct the sendfile specs for the filenameLoïc Hoguin
2018-07-18Add one manual per function for the ranch moduleLoïc Hoguin
Also review and update the ranch(7) manual and fix a few specs.
2018-07-04Return errors from Transport:handshakeLoïc Hoguin
The "normal" errors are still silenced when calling ranch:handshake.
2018-07-02Introduce Transport:handshake/1,2j.uhlig
This commit deprecates Transport:accept_ack/1 in favor of a new forward-compatible function. Transport:handshake/1,2 will use ssl:handshake/2,3 from Ranch 2.0 onward.
2018-04-10Ranch 1.5.01.5.0Loïc Hoguin
2018-01-22Added transport functions getopts/2, getstat/1 and getstat/2Jan Uhlig
2017-06-07Update Copyright to 20171.4.0Loïc Hoguin
2016-11-24Update copyright yearLoïc Hoguin
2015-08-18Welcome to 2015Loïc Hoguin
2014-09-02Add Transport:secure/0Stéphane Wirtel
Currently Ranch checks if a connection is secure by checking if its name is 'ssl'. This isn't a very modular solution, adding an API function that returns whether a connection is secure.
2014-06-10Update copyright yearsLoïc Hoguin
2013-12-07Add Transport:shutdown/2Loïc Hoguin
Allows closing the socket in one or two directions.
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-07Merge branch 'connect_timeout' of git://github.com/heroku/ranchLoïc Hoguin
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-11-07Implements ranch_transport:connect/4.Geoff Cant
Adds a transport connect method that takes a timeout, with implementations for both ssl and tcp connections.
2013-08-16Add Transport:sendfile/4,/5James Fish
Adds offset based sendfile to transports. Same behaviour as file:sendfile/4,/5 except socket and file arguments are reversed and either a raw file or a filename can be used. sendfile/2,/4,/5 now compulsory callbacks in ranch_transport. ranch_tcp:sendfile/2 now defaults to a chunk_size of 8191 - the default for ranch_ssl:sendfile/2. The same default is used for both ranch_tcp:sendfile/4,5 and ranch_ssl:sendfile/4,5.
2012-08-20Add the 'ranch_transport' behaviourLoïc Hoguin
At the same time we make the 'port' option optional, defaulting to 0.