Skip to content

CountHostAddresses

Narta Xaymar Dirks edited this page Nov 1, 2026 · 1 revision

CountHostAddresses

CountHostAddresses:Int32 host_name:String
Parameter Mode Type Default Description
host_name In String required A host name such as localhost, or an address as text. Brackets around an IPv6 address are allowed.

Returns: The number of addresses.

Description

Looks up a host name and returns how many addresses it has, IPv4 and IPv6. Use GetHostAddress to get them as text. A name that cannot be found returns 0. An empty name is this computer, which has one address for every network interface that is up: the ones other computers can reach first, then the ones that only work on the same network (fe80::), and the loopback addresses (127.0.0.1, ::1) last.

Differences

Examples

Print CountHostAddresses("127.0.0.1")
Print GetHostAddress$(1)
1
127.0.0.1

Related Commands

CloseTCPStream, CountHostIPs, GetHostAddress, HostIP

Home · Command Index



Differences
Language Features
BlitzBasic
Blitz3D
BlitzPlus

Clone this wiki locally