struct PortChecker

Overview

Creates local Sockets to know local available ports.

Defined in:

port_checker.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(host : String, tcp : Bool = false, udp : Bool = false) #

[View source]

Instance Method Detail

def address=(host : String) #

[View source]
def available_port?(port : Int32) : Bool #

Returns an available port.


[View source]
def first_available_port(start_port : Int32 = @ipaddress.port) : Int32? #

Returns the first available port.


[View source]
def ipaddress : Socket::IPAddress #

[View source]
def tcp : Bool #

[View source]
def tcp=(tcp : Bool) #

[View source]
def udp : Bool #

[View source]
def udp=(udp : Bool) #

[View source]