Hi Mohammad,
In the Genode RPC we start the client and the server in the same time as in Hello world tutorial. in my case i want the server to serve many clients in the same time .if i create run file for each client each time a new server instance (process) will be created . are there any ways to make the second client use the same running server . i tried to run the both client in same run file but it did not work.I am sure that there are some way to get capability from the existing server .
taking the hello-world tutorial as example, you can start any number of clients. E.g., the attached patch changes the 'hello_tutorial/run/hello.run' script to start two clients instead of one. Both are talking to the same server. Note that each program started by init must have a unique name. Hence, the second client is named differently and executable binary is explicitly specified using the '<binary>' node.
You can apply the patch via
cd <genode-dir> patch -p1 < hello_two_clients.diff
After applying the patch, change to your build directory and execute the run script via 'make run/hello'.
For more detailed information about how session requests by clients are routed to servers, please refer to the documentation of the init process:
http://genode.org/documentation/developer-resources/init
Best regards Norman