j
jaipkg.dev
packages / library / jai-ip-address

jai-ip-address

b245918library

A native Jai standalone IPv4 / IPv6 parser

MIT · updated 1 month ago

IPAddress

A standalone IP address module, for parsing, comparing and converting IP addresses to and from strings.

image

About

This module was originally a native Jai port of the Address class in Glenn Fielder's yojimbo library, as of this commit.

It has been completely rewritten from scratch, with many features added, including significant error handling improvements.

Basic Usage

address_v4 := address_init_v4("127.0.0.1:80");
print("%\n%\n", address_v4, address_to_string(address_v4));

address_v6 := address_init_v6("[::1]:80");
print("%\n%\n", address_v6, address_to_string(address_v6));

See the source code for more details!