ludic/docs/language/udp/udp-local_ip.md
Orkuncakilkaya ebb1a00352 feat(udp): Udp.* - polled IPv4 datagrams on macOS and Windows
Udp.open/port/send/recv/from_ip/from_port/close/resolve/local_ip/ip/ip_text, native
BSD sockets (udp.ll) and Winsock (udp_win.ll, -lws2_32), linked only when a program
uses Udp.*; example, docs and tests.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-17 11:16:14 +03:00

441 B

id name category kind tokens sig tip order ns member
udp-local_ip Udp.local_ip udp namespace-method Udp.local_ip Udp.local_ip() -> int This machine's address. 8 Udp local_ip

The address this machine reaches the internet from - the one a player on the same network would dial. No packet is sent; 0 when there is no route.

program Demo {
  entry {
    print(Udp.ip_text(ip: Udp.local_ip()))
  }
}