[erlang-questions] undefined function lib_chan:start/0
Harit Himanshu
harit.subscriptions@REDACTED
Sat Jan 24 15:44:32 CET 2015
I am learning Erlang from Joe's book and one of the thing he teaches is
about socket programming.
His code example runs like
1>* kvs:start().*
true
2>* lib_chan:start_server().*
Starting a port server on 1234...
true
I try to do the same thing with code he provided
-module(mod_name_server).
-author("harith").
%% API
-export([start_me_up/3]).
start_me_up(MM, _ArgsC, _ArgsS) ->
loop(MM).
loop(MM) ->
receive
{chan, MM, {store, K, V}} ->
kvs:store(K, V),
loop(MM);
{chan, MM, {lookup, K}} ->
MM ! {send, kvs:lookup(K)},
loop(MM);
{chan_closed, MM} ->
true
end.
But when I run, I see following
1> c(kvs).
{ok,kvs}
2> c(mod_name_server).
{ok,mod_name_server}
3> kvs:start().
true
4> lib_chan:start().
** exception error: undefined function lib_chan:start/0
5> lib_chan_mm:start().
** exception error: undefined function lib_chan_mm:start/0
6>
I even tried for lib_chan_mm, but no luck
What is going wrong here?
Thank you
+ Harit Himanshu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150124/407d2edb/attachment.htm>
More information about the erlang-questions
mailing list