TWSocketServer.SocketFamily

From Overbyte
Jump to navigation Jump to search
 TSocketFamily = (sfAny, sfAnyIPv4, sfAnyIPv6, sfIPv4, sfIPv6);

SocketFamily determines whether connections can use IPv4, IPv6 addresses or both, if both are available.

This effects DNS look-ups where increasingly both an IPv4 and IPv6 internet address are offered, ie Looking up Address for: www.google.com, Family: Any IP Address is: 2a00:1450:4009:80f::2004 IP Address is: 216.58.213.100

TSocketFamily may be:

sfAny Uses either IPv4 or IPv6 addresses.
sfAnyIPv4 Prefer IPv4 addresses, but allow IPv6 as well.
sfAnyIPv6 Prefer IPv6 addresses, but allow IPv4 as well.
sfIPv4 Only use IPv4 addresses.
sfIPv6 Only use IPv6 addresses.

Applications may use the following array of names for display purposes, available in unit OverbyteIcsWSocket.

 SocketFamilyNames: array [TSocketFamily] of PChar = ('Any', 'Prefer IPv4',
   'Prefer IPv6', 'Only IPv4', 'Only IPv6');