lib/ssltransportagent.rb
# both the AF_INET and AF_INET6 families use this DRY method
both the AF_INET and AF_INET6 families use this DRY method
both the AF_INET and AF_INET6 families use this DRY method
def bind_socket(family,port,ip)
    socket = Socket.new(family, SOCK_STREAM, 0)
    sockaddr = Socket.sockaddr_in(port.to_i,ip)
    socket.setsockopt(:SOCKET, :REUSEADDR, true)
    socket.bind(sockaddr)
    socket.listen(0)
    return socket
  end
def bind_socket ( family , port , ip ) socket = Socket . new ( family , SOCK_STREAM , 0 ) sockaddr = Socket . sockaddr_in ( port . to_i , ip ) socket . setsockopt ( :SOCKET , :REUSEADDR , true ) socket . bind ( sockaddr ) socket . listen ( 0 ) return socket end
both the AF_INET and AF_INET6 families use this DRY method
both the AF_INET and AF_INET6 families use this DRY method
family
<not_specific>
port
<not_specific>
ip
<not_specific>