Files
airalang/modules/net.md
T

487 B

📡 AiraLang net Module

Low-Level Network Diagnostics & Sockets

Import

import "net";

Methods

  • net.ping(host, [timeout=2]): Check ICMP reachability.
  • net.port_open(host, port, [timeout=2]): Test TCP socket connectivity.
  • net.local_ip(): Retrieve current local network IP address.
  • net.fetch(url): Quick HTTP GET shortcut.

Example

import "net";

say "Local IP: " + net.local_ip();
say "Gateway reachable: " + net.ping("1.1.1.1");