[fpc-pascal] SOLVED fpSelect fails with UDP sockets?

Klaus Hartnegg hartnegg at gmx.de
Sun Apr 3 18:44:35 CEST 2016


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&paste editing), but somehow it worked nevertheless.

Should have been
   dadr.sin_addr.s_bytes[1] := 127;
   dadr.sin_addr.s_bytes[2] := 0;
   dadr.sin_addr.s_bytes[3] := 0;
   dadr.sin_addr.s_bytes[4] := 1;

Loopback appears to catch the whole loopback network, not just that 
single address.



More information about the fpc-pascal mailing list