[fpc-pascal] SO_RCVTIMEO
Paul Davidson
pdavidson at coraxnetworks.com
Wed Sep 14 13:40:16 CEST 2005
Trying to get SetSocketOptions for SO_RCVTIMEO and SO_SNDTIMEO to work
with Darwin (FreeBSD).
type
p : pointer;
t : TimeVal;
t.tv_sec := mSec div 1000;
t.tv_usec := ( mSec mod 1000 ) * 1000;
p := @t;
if SetSocketOptions( fSocket, SOL_SOCKET, SO_SNDTIMEO, p, SizeOf( t ) )
<> 0 etc
returns "Math argument out of domain of func", i.e. EDOM error.
Reference http://www.rocketaware.com/man/man2/getsockopt.2.htm
Different OS's use different types. MS uses pointer to integer, while
others use a timeval structure.
An suggestions?
P D
More information about the fpc-pascal
mailing list