I'm having difficulties writing the rpc function. Specifically, I don't know how to pack a function name and input argument into a message body, send the message, set and unpack reply, and return result and error code. I know how to create the socket, request aconnection from the server etc. , but I'm totally stuck here.
It's a relatively simple rpc package consisting of user-stub and server-stub.