diff options
author | Stéphane Wirtel <[email protected]> | 2014-09-02 18:30:04 +0200 |
---|---|---|
committer | Stéphane Wirtel <[email protected]> | 2014-09-02 18:30:04 +0200 |
commit | 9176df9eb5a10c3aaee0dd4bc424f9453c441c9d (patch) | |
tree | a698cb004409227bf44e464b7af05ccbd627db9f /src/ranch_transport.erl | |
parent | adf1822defc2b7cfdc7aca112adabfa1d614043c (diff) | |
download | ranch-9176df9eb5a10c3aaee0dd4bc424f9453c441c9d.tar.gz ranch-9176df9eb5a10c3aaee0dd4bc424f9453c441c9d.tar.bz2 ranch-9176df9eb5a10c3aaee0dd4bc424f9453c441c9d.zip |
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.
Diffstat (limited to 'src/ranch_transport.erl')
-rw-r--r-- | src/ranch_transport.erl | 2 |
1 files changed, 1 insertions, 1 deletions
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()) |