Age | Commit message (Collapse) | Author |
|
Doing this in the connection process allows us to free acceptors
to start accepting more connections quicker, especially under load.
|
|
|
|
|
|
Adds a transport connect method that takes a timeout, with implementations for both ssl and tcp connections.
|
|
|
|
|
|
The implementation of elliptic-curve ciphers that has been introduced in
R16B01 is still incomplete (and broken). This makes our previous
workaround (see c0c09a1311) work for R16B02 as well.
|
|
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.
|
|
Unfortunately the implementation of elliptic-curve ciphers that has
been introduced in R16B01 is incomplete. Depending on the particular
client, this can cause the TLS handshake to break during key agreement.
As it turns out that most popular browsers (e.g. Firefox, Chromium,
and Safari) are affected by this bug, we provide this workaround.
This workaround makes sure that only cipher suite implementations that
are not known to be broken are supported by default.
|
|
|
|
|
|
|
|
The Erlang SSL library allows keys, certs and cacerts to be passed either as DER encoded binaries or in PEM encoded files. This patch allows ranch_ssl to be configured in either manner.
|
|
This should be an acceptable temporary solution to the ssl_accept
problem. We no longer have to worry about acceptors being dead
because ssl_accept never returned.
|
|
For TLS Next Protocol Negotiation support.
|
|
|
|
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.
|
|
Uses file:sendfile/2 for TCP, a fallback function for SSL.
|
|
|
|
|
|
|
|
Enabled by default.
A comprehensive explanation about TCP_NODELAY and the Nagle algorithm
can be found at http://www.stuartcheshire.org/papers/NagleDelayedAck/
|
|
At the same time we make the 'port' option optional, defaulting to 0.
|
|
Distinguish the errors from transport_accept and ssl_accept
in ranch_ssl. {error, closed} for the first one means the listening
socket got closed; for the second one it means the connection
socket was.
Ignore all errors except when the listening socket got closed,
where we want to crash to allow opening the socket again.
|
|
Also use one export per line to improve future diffs.
Bump the version to 0.2.1 to reflect this change.
|
|
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.
|