Search results

There are no results.

std.net.socket.SocketAddress

class pub SocketAddress

An IPv4 or IPv6 socket address.

Fields

ip

let pub @ip: IpAddress

The IPv4/IPv6 address of this socket address.

port

let pub @port: Int

The port number of this socket address.

Instance methods

!=

Show source code
Hide source code
fn pub !=(other: T) -> Bool {
  (self == other).false?
}
fn pub !=(other: T) -> Bool

Returns true if self and the given object are not equal to each other.

==

Show source code
Hide source code
fn pub ==(other: ref SocketAddress) -> Bool {
  @ip == other.ip and @port == other.port
}
fn pub ==(other: ref SocketAddress) -> Bool

Returns true if self and other are the same.

fmt

Show source code
Hide source code
fn pub fmt(formatter: mut Formatter) {
  formatter.write('${@ip}:${@port}')
}
fn pub fmt(formatter: mut Formatter)

Formats self in a human-readable format for debugging purposes.

Implemented traits

std.cmp.

Equal

impl Equal[ref SocketAddress] for SocketAddress
std.fmt.

Format

impl Format for SocketAddress