3 -- Include L4 functionality
6 -- Some shortcut for less typing
7 local ld = L4.default_loader;
9 -- Name space for the server program, giving access to the full rom name
10 -- space. The server will register the name 'calc_server'.
11 local ns_clntsrv_server = ld:create_namespace({
12 rom = L4.Env.names:q("rom");
16 -- The server program, using the 'ns_clntsrv_server' name space. Note that
17 -- the name space is read-write so that the server can register its name.
18 ld:start({ ns = ns_clntsrv_server:rw(),
19 log = { "server", "blue" } },
20 "rom/ex_clntsrv-server");
22 -- The client program. The name space is constructed inline and links to the
23 -- 'calc_server' entry from the server name space so that it is able to find
24 -- it. The 'rom' name space is automatically added.
25 -- The client will be started with a green log output.
26 ld:start({ ns = { calc_server = ns_clntsrv_server:l("calc_server") },
27 log = { "client", "green" } },
28 "rom/ex_clntsrv-client");