network.udp · function ·
UdpSocketLocalPort
Udp socket local port.
Exchange bounded UDP datagrams; your application owns its protocol and session rules.
external UdpSocketLocalPort(udpSocket socket) returns intStatus: source-declared
Parameters
udpSocket socket- Supply socket as udpSocket.
Use UdpSocketLocalPort
A complete small caller. Values are illustrative; check the returned result and package requirements before connecting live resources.
cpu · source-example · type checked
using network.udp
// Exchange bounded UDP datagrams; your application owns its protocol and session rules.
udpSocket socket = udpSocket(1, 1)
int result = UdpSocketLocalPort(socket)
Console.Log(Text.From(result))
project.mech
manifestVersion = "2"
package = "api.example.network_udp__udpsocketlocalport"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"
[app]
kind = "headless"
[[dependencies]]
package = "network.udp"
version = "0.1.0"
path = "../../../yeho/packages/network/udp"
Notes and source
Package presence and a declaration do not establish support on every host. Host services need their platform and lifecycle setup.
yeho/packages/network/udp/udp.yh:129