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
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