Types/fns concerning Internet Protocol (IP), versions 4 & 6

Type GetAddrData

type GetAddrData = {output_ch: oldcomm::Chan<result::Result<~[IpAddr], IpGetAddrErr>>,}

Type ParseAddrErr

type ParseAddrErr = {err_msg: ~str,}

Human-friendly feedback on why a parse_addr attempt failed

Enum IpAddr

An IP address

Variants

Enum IpGetAddrErr

Represents errors returned from net::ip::get_addr()

Variants

Function format_addr

fn format_addr(ip: &IpAddr) -> ~str

Convert a IpAddr to a str

Arguments

Function get_addr

fn get_addr(node: &str, iotask: iotask) ->
 result::Result<~[IpAddr], IpGetAddrErr>

Attempts name resolution on the provided node string

Arguments

Returns

A result<~[ip_addr], ip_get_addr_err> instance that will contain a vector of ip_addr results, in the case of success, or an error object in the case of failure

Function get_addr_cb

fn get_addr_cb(handle: *uv_getaddrinfo_t, status: libc::c_int, res: *addrinfo)

Function get_port

fn get_port(ip: &IpAddr) -> uint

Get the associated port

Arguments