class IO::Endpoint::AddressEndpoint
def bind(wrapper = self.wrapper, &block)
-
(Array(Socket))- the bound socket
Other tags:
- Yield: - An optional block which will be passed the socket.
def bind(wrapper = self.wrapper, &block) [wrapper.bind(@address, **@options, &block)] end
def connect(wrapper = self.wrapper, &block)
-
(Socket)- the connected socket
def connect(wrapper = self.wrapper, &block) wrapper.connect(@address, **@options, &block) end
def initialize(address, **options)
def initialize(address, **options) super(**options) @address = address end
def inspect
def inspect "\#<#{self.class} address=#{@address.inspect}>" end
def to_s
def to_s case @address.afamily when Socket::AF_INET "inet:#{@address.inspect_sockaddr}" when Socket::AF_INET6 "inet6:#{@address.inspect_sockaddr}" else "address:#{@address.inspect_sockaddr}" end end