method SocketAddr.of
The address ip:port.
Example:
use std.net { SocketAddr, IpAddr }
fn main() io {
print(SocketAddr.of(IpAddr.loopback(), 8080).toString())
}Output
127.0.0.1:8080
pub(api) static fn of(ip: IpAddr, port: u16) -> SocketAddrSince. 1.0.0-beta
Parameters
| Name | Type |
|---|---|
ip | IpAddr |
port | u16 |
Returns
Effects
none declared (pure unless the body says otherwise)
Defined in: std/net/net.oxl:312