Skip to content

CountHostIPs

Narta Xaymar Dirks edited this page Nov 1, 2026 · 7 revisions

Blitz3DBlitzPlusBlitzBasic

CountHostIPs

CountHostIPs: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.

Returns: The number of addresses.

Description

Looks up a host name and returns how many addresses it has. Use HostIP to get them. 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, with the loopback address (127.0.0.1) last.

Differences

  • Only IPv4 addresses are counted, use CountHostAddresses for IPv6 too. UDPStreamIP is the first address of this computer.

Examples

Print CountHostIPs("localhost") >= 1
1

Related Commands

CloseUDPStream, CountHostAddresses, GetHostAddress, HostIP

Home · Command Index



Differences
Language Features
BlitzBasic
Blitz3D
BlitzPlus

Clone this wiki locally