Anonymous avatar 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}.
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.