wkitt...@windstream.net wrote:
NOTE: i've not done any research to see what dadr.sin_addr.s_bytes is
but i assume that it is an array of bytes to contain each of the IP
address parts...
It's usually an untagged variant record so you can also do something like
target.s_addr:=
On 04/03/2016 12:32 PM, Klaus Hartnegg wrote:
dadr.sin_family := AF_INET;
dadr.sin_addr.s_bytes[1] := 127;
dadr.sin_addr.s_bytes[2] := 0;
dadr.sin_addr.s_bytes[2] := 0;
dadr.sin_addr.s_bytes[2] := 1;
shouldn't this be
dadr.sin_addr.s_bytes[1] := 127;
Am 03.04.2016 um 18:32 schrieb Klaus Hartnegg:
dadr.sin_addr.s_bytes[1] := 127;
dadr.sin_addr.s_bytes[2] := 0;
dadr.sin_addr.s_bytes[2] := 0;
dadr.sin_addr.s_bytes[2] := 1;
The array index numbers are of course garbage (from incomplete
copy editing), but somehow it worked
It works with
rc := fpSelect (sock+1,@FDS,nil,nil,5000);
I did not understand the description of the first argument in the docs,
so I used the value from the sample, this was not a good idea.
For reference here is the source that works:
Uses
UnixType, BaseUnix, Sockets;
procedure abort