[okl4-developer] Building an iguana server
Charles Wong
charlesw at ok-labs.com
Thu Mar 27 14:25:06 EST 2008
Hi!
On 26/03/2008, at 4:29 AM, Jorge Torres wrote:
> Hi Remy,
>
>
> The uuid is indeed an Universal Unique IDentifier and the only way
> to keep
> it unique is to be carefull, am i right ?
> Yes
The uuid need only be unique within an idl4 file.
>
>
> How does the interface system work and especially how do i use it on
> the
> other side (client) ?
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.
>
> It uses the magpie idl compiler
>
> http://wiki.nyloncactus.com/doku.php?id=magpie:doc
>
>
> Which stuff logically belong to :
> - libs/[my_server]/ ?
> The libraries used for your server
libs/blah contains the interface that clients have access to.
>
>
> - iguana/[my_server]/ ?
> YOur sever main() code
iguana/blah contains the server implementation code.
>
>
> Is having a file like libs/[my_server]/include/interfaces/
> [my_server].idl4
> the only way to have [my_server]_serverdecls.h and
> [my_server]_serverloop.c generated ?
>
> You can do your own serverloop inside your servers main,
It is entirely possible to write your own servereloop, however using
an idl4 file is helpful if what you're trying to do is non-trivial.
Cheers
Charles
>
> All the best,
>
> Jorge
>
>
> --
> Remy Gottschalk - rgottschalk at linagora.com
> Ingénieur informatique embarquée
> Groupe LINAGORA - http://www.linagora.com
> Tél.: +33(0)1 58 18 68 28 - Fax : +33(0)1 58 18 68 29
>
>
>
> _______________________________________________
> Developer mailing list
> Developer at okl4.org
> https://lists.okl4.org/mailman/listinfo/developer
>
> _______________________________________________
> Developer mailing list
> Developer at okl4.org
> https://lists.okl4.org/mailman/listinfo/developer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.okl4.org/pipermail/developer/attachments/20080327/8ec67d37/attachment.htm
More information about the Developer
mailing list