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

Enum IpAddr

An IP address

Variants

Struct ParseAddrErr

pub struct ParseAddrErr {
    err_msg: ~str,
}

Human-friendly feedback on why a parse_addr attempt failed

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_port

fn get_port(ip: &IpAddr) -> uint

Get the associated port

Arguments