View Source gen_nb_server behaviour (erldns v4.2.0)
Summary
Functions
Start server listening on IpAddr:Port
Types
-type state() :: term().
Callbacks
-callback handle_call(Request :: term(), From :: {pid(), Tag :: term()}, State :: state()) -> {reply, Reply :: term(), NewState :: state()} | {reply, Reply :: term(), NewState :: state(), timeout() | hibernate} | {noreply, NewState :: state()} | {noreply, NewState :: state(), timeout() | hibernate} | {stop, Reason :: term(), Reply :: term(), NewState :: state()} | {stop, Reason :: term(), NewState :: state()}.
-callback new_connection(Socket :: gen_tcp:socket(), State :: state()) -> {ok, NewServerState :: state()} | {stop, Reason :: term(), NewServerState :: state()}.
-callback sock_opts() -> [gen_tcp:listen_option()].