aboutsummaryrefslogtreecommitdiffstats
path: root/src/gun.erl
diff options
context:
space:
mode:
authorSeudin Kasumovic <[email protected]>2018-05-04 21:10:44 +0200
committerLoïc Hoguin <[email protected]>2018-05-15 13:55:15 +0200
commit0cbdd2fc95e58b197909e313748d0870c05a8da7 (patch)
treee081868e3b3e756fdf4e4bcc23d462fd30e6a519 /src/gun.erl
parent6d5710c509548dfe0965d3c279b119978a3fc19d (diff)
downloadgun-0cbdd2fc95e58b197909e313748d0870c05a8da7.tar.gz
gun-0cbdd2fc95e58b197909e313748d0870c05a8da7.tar.bz2
gun-0cbdd2fc95e58b197909e313748d0870c05a8da7.zip
Allow IP tuple for host #152
Diffstat (limited to 'src/gun.erl')
-rw-r--r--src/gun.erl6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gun.erl b/src/gun.erl
index f628199..a4ef417 100644
--- a/src/gun.erl
+++ b/src/gun.erl
@@ -125,14 +125,14 @@
%% Connection.
--spec open(inet:hostname(), inet:port_number())
+-spec open(inet:hostname() | inet:ipaddress(), inet:port_number())
-> {ok, pid()} | {error, any()}.
open(Host, Port) ->
open(Host, Port, #{}).
--spec open(inet:hostname(), inet:port_number(), opts())
+-spec open(inet:hostname() | inet:ipaddress(), inet:port_number(), opts())
-> {ok, pid()} | {error, any()}.
-open(Host, Port, Opts) when is_list(Host); is_atom(Host) ->
+open(Host, Port, Opts) when is_list(Host); is_atom(Host); is_tuple(Host) ->
do_open(Host, Port, Opts).
-spec open_unix(Path::string(), opts())