I'm trying to send an array of data as an rpc reply using golang's built-in net/rpc server and client and the net/rpc/jsonrpc codec. But I'm running into some trouble.
The data I'm sending is around 48 bytes, and the client will just hang in client.Call.
I've made a playground that replicates the problem: https://go.dev/play/p/_IQ9SF7TSdc
If you change the constant "N" in the above program to 5, things work as expected!
Another playground shows how the issue seems to crop up only when the slice/array in question exceeds 49 bytes: https://go.dev/play/p/R8CQa0mv7vB
Does anyone know what might be the issue? Golang's tests for the array and slice data types are not exactly designed for "large" arrays in mind. Thanks in advance.
SOCK_SEQPACKET: Provides a sequenced, reliable, two-way connection-based data transmission path for datagrams of fixed maximum length; a consumer is required to read an entire packet with each input system call.That is of course not going to work for a service which is not designed to use it, and is expecting a stream protocol.