[erlang-questions] How can i communicate with a gen_server-based server

Maxim Treskin zerthurd@REDACTED
Fri Mar 28 09:34:35 CET 2008


> i try:
> 2> Pid=authserver:start_link().
> Authserver start_link
> Authserver init with []
> {ok,<0.32.0>}
> 3> Pid!{213,'root','12345'}.
> ** exception error: bad argument
> in operator !/2
> called as {ok,<0.32.0>} ! {213,root,'12345'}
> 4>
>
> what can i do?

Pid has value {ok,<0.32.0>}, its type not pid().
You must write:
{ok, Pid}=authserver:start_link().

--
Maxim Treskin



More information about the erlang-questions mailing list