From a767abb47e6d9a0817d37413e1b5c1d338b362d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Wed, 4 Jul 2018 12:33:30 +0200 Subject: Enable TLS upgrades via ranch_ssl:handshake/3 Based on the work done by @juhlig. --- doc/src/manual/ranch_transport.asciidoc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'doc/src/manual') diff --git a/doc/src/manual/ranch_transport.asciidoc b/doc/src/manual/ranch_transport.asciidoc index 6545720..ec35589 100644 --- a/doc/src/manual/ranch_transport.asciidoc +++ b/doc/src/manual/ranch_transport.asciidoc @@ -55,13 +55,18 @@ Options = any():: Options for initialization. Timeout = timeout():: Handshake timeout. CSocket1 = any():: Initialized socket for this connection. -Perform post-accept initialization of the connection. +Perform any necessary handshake for this transport. This function will be called by connection processes before performing any socket operation. It allows transports that require extra initialization to perform their task and return a socket that is ready to use. +This function may also be used to upgrade a connection +from a transport to another depending on the capabilities +of the transports. For example a `ranch_tcp` socket may +be upgraded to a `ranch_ssl` one using this function. + === listen(TransOpts) -> {ok, LSocket} | {error, atom()} TransOpts = any():: Transport options. -- cgit v1.2.3