[okl4-developer] Building an iguana server
Remy Gottschalk
rgottschalk at linagora.com
Fri Mar 28 04:34:02 EST 2008
Hi
Tanks for those informations it seems that i am starting to get how it
work but some points still remain unclear.
>
> In addition to generating the [name]_serverloop.c and the
> [name]_serverdecls.h files, magpie also produces a [name]_client.h
> file that contains the corresponding client functions. These client
> functions are called from the library code.
>
> To illustrate:
>
> [idl4]
>
> interface foo
> {
> void bar(int a, int b, char c);
> }
>
> will generate an interface function foo_bar(a,b,c) for clients to
> call. The arguments a, b, and c are automatically marshalled into
> message registers and sent over IPC.
>
> On the server side, a function foo_bar_impl(caller, a, b, c, env)
> should contain the actual implementation. caller identifies the
> client that made the call; env can be ignored.
>
For what i have seen you generally add another abstraction layer to this
(as for naming, event and timer).
What I have understood looking at those server is the the following :
Interfaces are :
Defined in : libs/bla/include/interfaces/bla.idl4
Implemented : iguana/bla/src/bla.c
And another wrapping is done via functions in :
- libs/bla/include/
- libs/bla/src/
Of course this is the "fullest set" and the whole is not always needed.
On the client's side you need to include bla_client.h or bla.h
respectively found in build/iguana/include/interfaces/ and
build/iguana/include/bla.h. The first one is generated and the second is a
simple copy of lib/bla/include/bla.h.
And the client also need to be linked with libbla.a found in
build/iguana/lib/
Could you confirm that for this part i am not misunderstanding too much ?
Could you also briefly tell me how work and how to use the mighty
SESSION() Macro witch seem to be nice for passing the server thread
identifier.and some more info.
And lastly what is the simplest way to call my newly created server, and
from how "far" can i contact it, is it for example possible/desirable to
call it from inside a linux's thread.
More information about the Developer
mailing list