FormatSocketAddress (open)

Correctly formats a socket address (surrounding IPv6 addresses with [])

Syntax

LOADLIB "wh::internet/tcpip.whlib";

STRING FUNCTION FormatSocketAddress(STRING ip, INTEGER port)

Parameters

STRING ip

IP address

INTEGER port

Port number

Return value

STRING

Formatted socket address (eg. '127.0.0.1:123', '[2001:db8::1]:123')