Types/fns concerning Internet Protocol (IP), versions 4 & 6
GetAddrData
ParseAddrErr
- Human-friendly feedback on why a parse_addr attempt failedIpAddr
- An IP addressIpGetAddrErr
- Represents errors returned from net::ip::get_addr()
format_addr
- Convert a ip_addr
to a strget_addr
- Attempts name resolution on the provided node
stringget_addr_cb
net_ip::v4
net_ip::v6
GetAddrData
type GetAddrData = {output_ch: comm::Chan<result::Result<~[IpAddr], IpGetAddrErr>>,}
ParseAddrErr
type ParseAddrErr = {err_msg: ~str,}
Human-friendly feedback on why a parse_addr attempt failed
IpAddr
An IP address
Ipv4(sockaddr_in)
- An IPv4 addressIpv6(sockaddr_in6)
IpGetAddrErr
Represents errors returned from net::ip::get_addr()
GetAddrUnknownError
format_addr
fn format_addr(ip: & IpAddr) -> ~str
Convert a ip_addr
to a str
std::net::ip::ip_addr
get_addr
fn get_addr(node: & str, iotask: iotask) ->
result::Result<~[IpAddr], IpGetAddrErr>
Attempts name resolution on the provided node
string
node
- a string representing some host addressiotask
- a uv::iotask
used to interact with the underlying event loopA 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
get_addr_cb
fn get_addr_cb(handle: *uv_getaddrinfo_t, status: libc::c_int, res: *addrinfo)