From 9176df9eb5a10c3aaee0dd4bc424f9453c441c9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Wirtel?= Date: Tue, 2 Sep 2014 18:30:04 +0200 Subject: Add Transport:secure/0 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. --- src/ranch_transport.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ranch_transport.erl') diff --git a/src/ranch_transport.erl b/src/ranch_transport.erl index 2ccbd4d..83cc9bb 100644 --- a/src/ranch_transport.erl +++ b/src/ranch_transport.erl @@ -22,7 +22,7 @@ -export_type([sendfile_opts/0]). -callback name() -> atom(). -%% @todo -callback caps(secure | sendfile) -> boolean(). +-callback secure() -> boolean(). -callback messages() -> {OK::atom(), Closed::atom(), Error::atom()}. -callback listen(opts()) -> {ok, socket()} | {error, atom()}. -callback accept(socket(), timeout()) -- cgit v1.2.3