I'm attempting to send an array over RPC, but I receive "RPC: Can't encode arguments" when the data array becomes to large. Under 10Kb from what I've seen.
This is the line that fails.
xdr_bytes (xdrs, (char **)&objp->data, (uint*)&objp->len, objp->len))
Here's the struct being referenced.
struct dataStruct {
unsigned int len;
u_char *data;
};
Is there a way to fix this error, or another way to send arbitrarily large arrays?
After checking manpages for other RPC commands I found this:
"Warning: Using UDP has its shortcomings. Since UDP-based RPC messages can only hold up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results."
I was indeed using UDP, and after switching to TCP messages are sent to the server properly.