diff options
author | Geoff Cant <[email protected]> | 2013-11-07 13:17:22 -0800 |
---|---|---|
committer | Geoff Cant <[email protected]> | 2013-11-07 13:17:22 -0800 |
commit | 261e325883646912c880f2a1f2256b55eb7dcee9 (patch) | |
tree | c91f028201b24c615c9498074d0a512f6afbe524 /src/ranch_transport.erl | |
parent | b6662a357a02f8cd99d35eecd4288b847707f777 (diff) | |
download | ranch-261e325883646912c880f2a1f2256b55eb7dcee9.tar.gz ranch-261e325883646912c880f2a1f2256b55eb7dcee9.tar.bz2 ranch-261e325883646912c880f2a1f2256b55eb7dcee9.zip |
Implements ranch_transport:connect/4.
Adds a transport connect method that takes a timeout, with implementations for both ssl and tcp connections.
Diffstat (limited to 'src/ranch_transport.erl')
-rw-r--r-- | src/ranch_transport.erl | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ranch_transport.erl b/src/ranch_transport.erl index 6168b35..fe06420 100644 --- a/src/ranch_transport.erl +++ b/src/ranch_transport.erl @@ -52,6 +52,11 @@ -callback connect(string(), inet:port_number(), opts()) -> {ok, socket()} | {error, atom()}. +%% Experimental. Open a connection to the given host and port number +%% with a timeout. +-callback connect(string(), inet:port_number(), opts(), timeout()) + -> {ok, socket()} | {error, atom()}. + %% Receive data from a socket in passive mode. -callback recv(socket(), non_neg_integer(), timeout()) -> {ok, any()} | {error, closed | timeout | atom()}. |