Flowdock
method

connect_internal

Importance_0
connect_internal(local_addrinfo) private

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File ext/socket/lib/socket.rb, line 32
  def connect_internal(local_addrinfo)
    sock = Socket.new(self.pfamily, self.socktype, self.protocol)
    begin
      sock.ipv6only! if self.ipv6?
      sock.bind local_addrinfo if local_addrinfo
      sock.connect(self)
      if block_given?
        yield sock
      else
        sock
      end
    ensure
      sock.close if !sock.closed? && (block_given? || $!)
    end
  end
Register or log in to add new notes.