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

IPv6

The original network commands give addresses as a 32-bit number, which has room for IPv4 only. BlitzLLVM keeps them as they are and adds commands that give the address as text, which holds either kind.

  • OpenTCPStream takes a name, a dotted IPv4 address or an IPv6 address like ::1 or [::1]. If the name has several addresses, they are tried in the order the system prefers (IPv6 first where it works) until one connects.
  • CreateTCPServer and CreateUDPStream receive on IPv4 and IPv6 at once, on the same port. Where the system has no IPv6, they receive on IPv4 only.
  • A peer that uses IPv4 looks exactly as it did before: TCPStreamIP and UDPMsgIP give its number. A peer that uses IPv6 has no number, these give 0 for it.
  • The text commands work with both: GetTCPStreamAddress, GetUDPMsgAddress, GetUDPStreamAddress, CountHostAddresses, GetHostAddress and SendUDPMsgTo. IPv4 addresses are written 127.0.0.1, IPv6 ones ::1; a link-local one has the interface behind a % (fe80::1%eth0).
  • CountHostIPs, HostIP and SendUDPMsg only know IPv4, as before.
  • The multiplayer commands use TCP and so connect over IPv6 when the address given to JoinNetGame is one, and a host accepts both.
  • The environment variable BLITZLLVM_NET_IPV6=0 turns all of this off, and everything uses IPv4 only.

Home · Command Index



Differences
Language Features
BlitzBasic
Blitz3D
BlitzPlus

Clone this wiki locally