UNIX address representation.
Holds the local path of an UNIX address, usually coming from an opened connection (e.g. Socket#local_address, Socket#receive).
Example:
require "socket"
Socket::UNIXAddress.new("/tmp/my.sock") Creates an UNIXSocket from the internal OS representation.
Creates an UNIXSocket from the internal OS representation.
Parses a Socket::UNIXAddress from an URI.
Parses a Socket::UNIXAddress from an URI.
Same as #inspect(io).
Socket::Address
Socket::Address
Struct
Struct
Value
Object
Object
Object
Creates an UNIXSocket from the internal OS representation.
Creates an UNIXSocket from the internal OS representation.
Parses a Socket::UNIXAddress from an URI.
It expects the URI to include <scheme>://<path> where scheme as well as any additional URI components (such as fragment or query) are ignored.
If host is not empty, it will be prepended to #path to form a relative path.
require "socket"
Socket::UNIXAddress.parse("unix:///foo.sock") # => Socket::UNIXAddress.new("/foo.sock")
Socket::UNIXAddress.parse("unix://foo.sock") # => Socket::UNIXAddress.new("foo.sock") Parses a Socket::UNIXAddress from an URI.
It expects the URI to include <scheme>://<path> where scheme as well as any additional URI components (such as fragment or query) are ignored.
If host is not empty, it will be prepended to #path to form a relative path.
require "socket"
Socket::UNIXAddress.parse("unix:///foo.sock") # => Socket::UNIXAddress.new("/foo.sock")
Socket::UNIXAddress.parse("unix://foo.sock") # => Socket::UNIXAddress.new("foo.sock")
© 2012–2026 Manas Technology Solutions.
Licensed under the Apache License, Version 2.0.
https://crystal-lang.org/api/1.19.0/Socket/UNIXAddress.html