aboutsummaryrefslogtreecommitdiffstats
path: root/src/cowboy_ssl_transport.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2012-04-30 22:24:52 +0200
committerLoïc Hoguin <[email protected]>2012-04-30 22:24:52 +0200
commit48a2b177f587c742c30428e4319075fdc12157b7 (patch)
tree8e2b4e48361681cad25042ba85a22187ec452154 /src/cowboy_ssl_transport.erl
parentbc2d53d2a5e865ce36a0419c4d4698b30359415b (diff)
parentee8c50c5ab97dcaebc8932d093741fdb496e00f7 (diff)
downloadcowboy-48a2b177f587c742c30428e4319075fdc12157b7.tar.gz
cowboy-48a2b177f587c742c30428e4319075fdc12157b7.tar.bz2
cowboy-48a2b177f587c742c30428e4319075fdc12157b7.zip
Merge branch 'cowboy-client'
Diffstat (limited to 'src/cowboy_ssl_transport.erl')
-rw-r--r--src/cowboy_ssl_transport.erl7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/cowboy_ssl_transport.erl b/src/cowboy_ssl_transport.erl
index 3b130f0..a661622 100644
--- a/src/cowboy_ssl_transport.erl
+++ b/src/cowboy_ssl_transport.erl
@@ -25,6 +25,7 @@
-module(cowboy_ssl_transport).
-export([name/0, messages/0, listen/1, accept/2, recv/3, send/2, setopts/2,
controlling_process/2, peername/1, close/1, sockname/1]).
+-export([connect/3]).
%% @doc Name of this transport API, <em>ssl</em>.
-spec name() -> ssl.
@@ -37,6 +38,12 @@ name() -> ssl.
-spec messages() -> {ssl, ssl_closed, ssl_error}.
messages() -> {ssl, ssl_closed, ssl_error}.
+%% @private
+%% @todo Probably filter Opts?
+connect(Host, Port, Opts) when is_list(Host), is_integer(Port) ->
+ ssl:connect(Host, Port,
+ Opts ++ [binary, {active, false}, {packet, raw}]).
+
%% @doc Setup a socket to listen on the given port on the local host.
%%
%% The available options are: