ludic/docs/language/udp/udp-resolve.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

22 lines
430 B
Markdown

---
id: udp-resolve
name: Udp.resolve
category: udp
kind: namespace-method
tokens: Udp.resolve
sig: Udp.resolve(name) -> int
tip: Look a host name up.
order: 7
ns: Udp
member: resolve
---
Returns the first IPv4 address of a host name, or <code>0</code>. It waits for the system's resolver, so call it outside the frame loop.
```ludic
program Demo {
entry {
print(Udp.ip_text(ip: Udp.resolve(name: "localhost")))
}
}
```