Socket::UNIXAddress

struct Socket::UNIXAddress

Overview

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:

Socket::UNIXAddress.new("/tmp/my.sock")

Defined in:

socket/address.cr

Class Method Summary

Instance Method Summary

Class Method Detail

def self.from(sockaddr : Pointer(LibC::Sockaddr), addrlen) : UNIXAddressSource

Creates an UNIXSocket from the internal OS representation.

def self.new(sockaddr : Pointer(LibC::SockaddrUn), size)Source

def self.new(path : String)Source

Instance Method Detail

def ==(other : UNIXAddress)Source

def path : StringSource

def to_s(io)Source

def to_unsafe : Pointer(LibC::Sockaddr)Source

© 2012–2017 Manas Technology Solutions.
Licensed under the Apache License, Version 2.0.
https://crystal-lang.org/api/0.22.0/Socket/UNIXAddress.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部