{"id":"network.udp--UdpSocketLocalPort","name":"UdpSocketLocalPort","owner":"yeho","package":"network.udp","kind":"function","signature":"external UdpSocketLocalPort(udpSocket socket) returns int","description":"Udp socket local port.","context":"Exchange bounded UDP datagrams; your application owns its protocol and session rules.","parameters":[{"name":"socket","type":"udpSocket","description":"Supply socket as udpSocket."}],"returns":"int","members":[],"tags":["cpu","function","network","network.udp","source-example","udp","yeho"],"updated":"2026-09-09","source":{"repository":"yeho","path":"packages/network/udp/udp.yh","line":129,"sha256":"86f1afae57ddb278fb7a4fda81b70922cbe2ef263b2c663b3bc74c3fa5abfc23"},"status":"source-declared","notes":["Package presence and a declaration do not establish support on every host. Host services need their platform and lifecycle setup."],"examples":[{"id":"usage","title":"Use UdpSocketLocalPort","description":"A complete small caller. Values are illustrative; check the returned result and package requirements before connecting live resources.","code":"using network.udp\n\n// Exchange bounded UDP datagrams; your application owns its protocol and session rules.\nudpSocket socket = udpSocket(1, 1)\nint result = UdpSocketLocalPort(socket)\nConsole.Log(Text.From(result))\n","manifest":"manifestVersion = \"2\"\npackage = \"api.example.network_udp__udpsocketlocalport\"\nversion = \"0.1.0\"\nlanguageEdition = \"yeho-core-2026.1\"\n\n[app]\nkind = \"headless\"\n\n[[dependencies]]\npackage = \"network.udp\"\nversion = \"0.1.0\"\npath = \"../../../yeho/packages/network/udp\"\n","tags":["cpu","source-example"],"verification":"type checked","run":"cpu-oracle","sha256":"290caa828902c0429aa3a3040c37ce7574d7daa1125f42eef25912ce404860f0","checked":"2026-09-09","diagnostic":"","observedOutput":null,"checkedBackend":null}],"searchTerms":[],"url":"https://demonhunterlabs.com/academy/api?item=network.udp--UdpSocketLocalPort","json":"https://demonhunterlabs.com/reference/items/network.udp--UdpSocketLocalPort.json","markdown":"https://demonhunterlabs.com/reference/text/network.udp--UdpSocketLocalPort.md"}
