Hello,
I must get data from a scale by socket. It works fine when the scale is online. If not the program waits without end. I try for several days to set a timeout for connecting to a socket. I tried it in this way but it has no effect. Any ideas how to get it?
D setsockopt PR 10I 0 ExtProc('qso_setsockopt98')
D socket_desc 10I 0 Value
D level 10I 0 Value
D option_name 10I 0 Value
D option_value * Value
D option_length 10I 0 Value
D p_timeval S *
d TimeVal DS based(p_timeval)
d Seconds 10i 0
d usec 10i 0
....
seconds = 5;
usec = 0;
setsockopt(sock
:SOL_SOCKET
:SO_RCVTIMEO
:%addr(Timeval)
:%size(Timeval)
);
I must get data from a scale by socket. It works fine when the scale is online. If not the program waits without end. I try for several days to set a timeout for connecting to a socket. I tried it in this way but it has no effect. Any ideas how to get it?
D setsockopt PR 10I 0 ExtProc('qso_setsockopt98')
D socket_desc 10I 0 Value
D level 10I 0 Value
D option_name 10I 0 Value
D option_value * Value
D option_length 10I 0 Value
D p_timeval S *
d TimeVal DS based(p_timeval)
d Seconds 10i 0
d usec 10i 0
....
seconds = 5;
usec = 0;
setsockopt(sock
:SOL_SOCKET
:SO_RCVTIMEO
:%addr(Timeval)
:%size(Timeval)
);
Comment