RPC program building

G

Giulio

I'm trying to learn how to create an RPC client/server.
I'm having problems in understanding how to make it.

in particular I'm studying
http://www.cs.cf.ac.uk/Dave/C/node33.html#SECTION003320000000000000000
and
http://www2.cs.uregina.ca/~hamilton/courses/430/notes/rpc.html

But I can't understand what to write in the files, and exactly which
files I've got to write & which will be generated by rpcgen.

I've ready the local version of my program, that uses a function that
I've wrote in a separate file.
In total so I've three files:
-client.c (which will be the client of the application)
-sorter.h & sorter.c (which contains the definition e the implementation
of the function
int *sort(int *a, int size_a), that simply sorts a vector of integers)

actually client.c invokes sort and prints the result.

I would like to modify the whole to make the sort procedure a remote
procedure.

I didn't understood if I have to write the stubs or rpcgen generates
them. if the second, how to generate them.

then I didn't understood how should I change the parameters of the
functions, I've read that I should use only one parameter per function,
and in case I can define a structure, But I don't know how to set in a
structure an array of integers.

then I think I've understood that I've to create another separate
standalone software (containing another main()) to be run in the server
who calls the procedure to register the function in the rpc server..

I think I've misunderstood many things,

I'm asking you some explanation or some links to tutorials or manuals
where this argument is explained more clearly or in a more straight way.

thank you very much
Giulio
 
J

Jack Klein

I'm trying to learn how to create an RPC client/server.
I'm having problems in understanding how to make it.

[snip]

Sorry, but you are asking in the wrong place. The C language itself
has absolutely zero support for RPC, or any other sort of networking
or even communication between separate programs, other than reading
and writing files.

All such programming of this type requires the use of non-standard
(from the C point of view) implementation-specific extensions provided
by you particular compiler/operating system combination, and you need
to ask about them in a group that supports that combination.

I would try to suggest an appropriate platform specific group, but
since your newsreader deliberately hides all clues from the headers, I
have nothing to go on.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,772
Messages
2,569,593
Members
45,111
Latest member
KetoBurn
Top