Skip to content

Instantly share code, notes, and snippets.

@si14
Created November 13, 2013 12:44
Show Gist options
  • Save si14/7448481 to your computer and use it in GitHub Desktop.
Save si14/7448481 to your computer and use it in GitHub Desktop.
-module(tmp).
-behaviour(gen_server).
%% API
-export([start_link/0]).
%% gen_server callbacks
-export([init/1, handle_call/3, handle_cast/2, handle_info/2,
terminate/2, code_change/3]).
-define(SERVER, ?MODULE).
-record(state, {}).
%%% API
start_link() ->
gen_server:start_link({local, ?SERVER}, ?MODULE, [], []).
%%% gen_server callbacks
init([]) ->
{ok, #state{}}.
handle_call(_Request, _From, State) ->
Reply = ok,
{reply, Reply, State}.
handle_cast(_Msg, State) ->
{noreply, State}.
handle_info(_Info, State) ->
{noreply, State}.
terminate(_Reason, _State) ->
ok.
code_change(_OldVsn, State, _Extra) ->
{ok, State}.
%%% Internal functions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment