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:
parent
9ad32386c0
commit
15dc645596
6 changed files with 17 additions and 17 deletions
|
@ -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),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue