abstract struct Socket::Address
inherits Struct
¶
Direct known subclasses
Socket::IPAddress
Socket::UNIXAddress
Class methods¶
.parse(uri : URI)
¶
(uri : URI)
Parses a Socket::Address
from an URI.
Supported formats:
* ip://<host>:<port>
* tcp://<host>:<port>
* udp://<host>:<port>
* unix://<path>
See IPAddress.parse
and UNIXAddress.parse
for details.
.parse(uri : String)
¶
(uri : String)
Parses a Socket::Address
from an URI.
Supported formats:
* ip://<host>:<port>
* tcp://<host>:<port>
* udp://<host>:<port>
* unix://<path>
See IPAddress.parse
and UNIXAddress.parse
for details.
.from(sockaddr : Pointer(LibC::Sockaddr), addrlen) : Address
¶
(sockaddr : Pointer(LibC::Sockaddr), addrlen) : Address
Returns either an IPAddress
or UNIXAddress
from the internal OS
representation. Only INET, INET6 and UNIX families are supported.