- if ip.family = AF_INET then begin\r
- sa.InAddr.family := AF_INET;\r
- sa.InAddr.port := 1;\r
- sa.InAddr.addr := ip.ip;\r
- end else {$ifdef ipv6}if ip.family = AF_INET6 then begin\r
- sa.InAddr6.sin6_family := AF_INET6;\r
- sa.InAddr6.sin6_port := 1;\r
- sa.InAddr6.sin6_addr := ip.ip6;\r
- end else{$endif} begin\r
- raise exception.create('unrecognised address family');\r
- end;\r