Flowdock
bind_random_port(udpsock, bind_host="0.0.0.0") public

No documentation

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

Hide source
# File lib/resolv.rb, line 651
    def self.bind_random_port(udpsock, bind_host="0.0.0.0") # :nodoc:
      begin
        port = rangerand(1024..65535)
        udpsock.bind(bind_host, port)
      rescue Errno::EADDRINUSE, # POSIX
             Errno::EACCES, # SunOS: See PRIV_SYS_NFS in privileges(5)
             Errno::EPERM # FreeBSD: security.mac.portacl.port_high is configurable.  See mac_portacl(4).
        retry
      end
    end
Register or log in to add new notes.