I'm writing a server that send an XDR struct over a socket. Using Wireshark I see that my client correctly send an XDR message to the server BUT I don't see any data go from the server to the client. But the code seems to be correct as it is the same used for the client. I have see that the problem is xdr_Response. Is there any mistake on it? Thanks to all
XDR xdrs_w;
Response y;
stream_socket_w = fdopen(s, "w");
xdrstdio_create(&xdrs_w, stream_socket_w, XDR_ENCODE);
y.error = 0;
y.result = 5.7;
xdr_Response(&xdrs_w, &y);
fflush(stream_socket_w);
with:
struct Response {
bool_t error;
float result;
};
typedef struct Response Response;