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

Use the inet:socket() type instead of the user-defined one.

This commit is contained in:
Loïc Hoguin 2011-04-18 00:06:26 +02:00
parent 9ad32386c0
commit 15dc645596
6 changed files with 17 additions and 17 deletions

View file

@ -20,7 +20,7 @@
-include("include/http.hrl").
-record(state, {
socket :: socket(),
socket :: inet:socket(),
transport :: module(),
dispatch :: dispatch(),
handler :: {Handler::module(), Opts::term()},
@ -32,7 +32,7 @@
%% API.
-spec start_link(Socket::socket(), Transport::module(), Opts::term())
-spec start_link(Socket::inet:socket(), Transport::module(), Opts::term())
-> {ok, Pid::pid()}.
start_link(Socket, Transport, Opts) ->
Pid = spawn_link(?MODULE, init, [Socket, Transport, Opts]),
@ -40,7 +40,7 @@ start_link(Socket, Transport, Opts) ->
%% FSM.
-spec init(Socket::socket(), Transport::module(), Opts::term()) -> ok.
-spec init(Socket::inet:socket(), Transport::module(), Opts::term()) -> ok.
init(Socket, Transport, Opts) ->
Dispatch = proplists:get_value(dispatch, Opts, []),
MaxEmptyLines = proplists:get_value(max_empty_lines, Opts, 5),