Copyright © 2009 Marc Worrell
Behaviours: gen_server.
Authors: Marc Worrell (marc@worrell.nl).
add_script/1 | Split the scripts from the context and add the scripts to the page. |
add_script/2 | Send a script to the user agent, will be queued and send when the comet process attaches. |
append/3 | |
check_timeout/1 | Kill this page when timeout has been reached. |
code_change/3 | Convert process state when code is changed. |
comet_attach/2 | Attach the comet request process to the page session, enabling sending scripts to the user agent. |
comet_detach/1 | Called when the comet request process closes, we will need to wait for the next connection. |
get/2 | |
get_attach_state/1 | |
get_scripts/1 | Called by the comet process or the page request to fetch any outstanding scripts. |
handle_call/3 | Handling call messages. |
handle_cast/2 | |
handle_info/2 | |
incr/3 | |
init/1 | Initiates the server, initialises the pid lookup dicts. |
ping/1 | Receive a ping, makes sure that we stay alive. |
set/3 | |
spawn_link/4 | Spawn a new process, linked to the page pid. |
start_link/0 | Starts the person manager server. |
start_link/1 | |
stop/1 | |
terminate/2 | This function is called by a gen_server when it is about to terminate. |
websocket_attach/2 | Attach the websocket request process to the page session, enabling sending scripts to the user agent. |
add_script(Context) -> any()
Split the scripts from the context and add the scripts to the page.
add_script(Script, Context) -> any()
Send a script to the user agent, will be queued and send when the comet process attaches
append(Key, Value, Context) -> any()
check_timeout(Pid) -> any()
Kill this page when timeout has been reached
code_change(OldVsn, State, Extra) -> {ok, NewState}
Convert process state when code is changed
comet_attach(CometPid, Pid) -> any()
Attach the comet request process to the page session, enabling sending scripts to the user agent
comet_detach(Pid) -> any()
Called when the comet request process closes, we will need to wait for the next connection
get(Key, Context) -> any()
get_attach_state(Pid) -> any()
get_scripts(Pid) -> any()
Called by the comet process or the page request to fetch any outstanding scripts
handle_call(Message::Request, From, State) -> {reply, Reply, State} | {reply, Reply, State, Timeout} | {noreply, State} | {noreply, State, Timeout} | {stop, Reason, Reply, State} | {stop, Reason, State}
Handling call messages
handle_cast(Message::Msg, State) -> {noreply, State} | {noreply, State, Timeout} | {stop, Reason, State}
handle_info(X1::Info, State) -> {noreply, State} | {noreply, State, Timeout} | {stop, Reason, State}
incr(Key, Value, Context) -> any()
init(Args) -> {ok, State} | {ok, State, Timeout} | ignore | {stop, Reason}
Initiates the server, initialises the pid lookup dicts
ping(Pid) -> any()
Receive a ping, makes sure that we stay alive
set(Key, Value, Context) -> any()
spawn_link(Module, Func, Args, Context) -> any()
Spawn a new process, linked to the page pid
start_link() -> {ok, Pid} | ignore | {error, Error}
Starts the person manager server
start_link(Args) -> any()
stop(Pid) -> any()
terminate(Reason, State) -> void()
This function is called by a gen_server when it is about to terminate. It should be the opposite of Module:init/1 and do any necessary cleaning up. When it returns, the gen_server terminates with Reason. The return value is ignored. Terminate all processes coupled to the page.
websocket_attach(WsPid, Context) -> any()
Attach the websocket request process to the page session, enabling sending scripts to the user agent
Generated by EDoc, Feb 25 2011, 21:14:41.