This is what I understand of it:
The .x file defines the interface and the parameters that are shared by the server and client. When you compile it with rpcgen, it generates the .h, _xdr.c, _clnt.c and _svc.c. The _clnt.c would be the stub and the _svc.c is the skelleton, right?
I understand that they intermediate the communication between the 2, but how so? Also, the example I've seen running had you specify the IP address of the machine to connect to (in the example it was using the same one, 127.0.0.1), but you don't specify the port. Does it have a reserved port?