Commits

Anonymous committed 5dd6dd5

Add specs for gen_server callbacks.

Comments (0)

Files changed (1)

 	Mod:setopts(Socket, Options).
 
 %% @hidden
+-spec init(any()) ->
+    {ok, any()} | {ok, any(), timeout() | hibernate} | {stop, any()} | ignore.
 init([Type, Mod, Args, Port, Options]) ->
 	Acceptors = proplists:get_value(acceptors, Options, 1),
 	Timeout = proplists:get_value(ssl_accept_timeout, Options, infinity),
 	end.
 
 %% @hidden
+-spec handle_call(any(), {pid(), any()}, any()) ->
+    {reply, any(), any()} | {reply, any(), any(), timeout() | hibernate} |
+    {noreply, any()} | {noreply, any(), timeout() | hibernate} |
+    {stop, any(), any(), any()} | {stop, any(), any()}.
 handle_call(port, _, #state{socket = Socket} = State) ->
 	{reply, sock_port(Socket), State};
 handle_call(Request, _, State) ->
 
 
 %% @hidden
+-spec handle_cast(any(), any()) ->
+    {noreply, any()} | {noreply, any(), timeout() | hibernate} |
+    {stop, any(), any()}.
 handle_cast(stop, State) ->
 	{stop, normal, State};
 handle_cast(_, State) ->
 	{noreply, State}.
 
 %% @hidden
+-spec handle_info(any(), any()) ->
+    {noreply, any()} | {noreply, any(), timeout() | hibernate} |
+    {stop, any(), any()}.
 handle_info(Info, State) ->
 	{CMod, CState} = State#state.callback,
 	case CMod:handle_info(Info, CState) of
 	end.
 
 %% @hidden
+-spec terminate(any(), any()) -> any().
 terminate(Reason, #state{callback = {CMod, CState}} = State) ->
 	close(State#state.socket),
 	CMod:terminate(Reason, CState).
 
 %% @hidden
+-spec code_change(any(), any(), any()) ->
+    {ok, any()}.
 code_change(_, _, State) ->
 	{ok, State}.