diff options
Diffstat (limited to 'src/gun_tls.erl')
-rw-r--r-- | src/gun_tls.erl | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gun_tls.erl b/src/gun_tls.erl index 6d749aa..f58620f 100644 --- a/src/gun_tls.erl +++ b/src/gun_tls.erl @@ -15,6 +15,7 @@ -module(gun_tls). -export([messages/0]). +-export([connect/3]). -export([connect/4]). -export([send/2]). -export([setopts/2]). @@ -23,6 +24,11 @@ messages() -> {ssl, ssl_closed, ssl_error}. +-spec connect(inet:socket(), any(), timeout()) + -> {ok, ssl:sslsocket()} | {error, atom()}. +connect(Socket, Opts, Timeout) -> + ssl:connect(Socket, Opts, Timeout). + -spec connect(inet:ip_address() | inet:hostname(), inet:port_number(), any(), timeout()) -> {ok, ssl:sslsocket()} | {error, atom()}. |