0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-16 05:00:24 +00:00

Rename inet:ip_port() to inet:port_number()

Thanks go to @superbobry for pointing it out.
This commit is contained in:
Loïc Hoguin 2012-03-12 21:57:07 +01:00
parent 5d46ad0e58
commit 3885912d9b
6 changed files with 14 additions and 12 deletions

View file

@ -467,8 +467,8 @@ hixie76_key_to_integer(Key) ->
Spaces = length([C || << C >> <= Key, C =:= 32]),
Number div Spaces.
-spec hixie76_location(atom(), binary(), inet:ip_port(), binary(), binary())
-> binary().
-spec hixie76_location(atom(), binary(), inet:port_number(),
binary(), binary()) -> binary().
hixie76_location(Protocol, Host, Port, Path, <<>>) ->
<< (hixie76_location_protocol(Protocol))/binary, "://", Host/binary,
(hixie76_location_port(Protocol, Port))/binary, Path/binary>>;
@ -482,7 +482,7 @@ hixie76_location_protocol(_) -> <<"ws">>.
%% @todo We should add a secure/0 function to transports
%% instead of relying on their name.
-spec hixie76_location_port(atom(), inet:ip_port()) -> binary().
-spec hixie76_location_port(atom(), inet:port_number()) -> binary().
hixie76_location_port(ssl, 443) ->
<<>>;
hixie76_location_port(tcp, 80) ->