Class: Specinfra::Command::Windows::Base::Port

Inherits:
Specinfra::Command::Windows::Base show all
Defined in:
lib/specinfra/command/windows/base/port.rb

Class Method Summary collapse

Methods inherited from Specinfra::Command::Windows::Base

create

Class Method Details

.check_is_listening(port, options = nil) ⇒ Object


3
4
5
6
7
8
# File 'lib/specinfra/command/windows/base/port.rb', line 3

def check_is_listening(port, options=nil)
  Backend::PowerShell::Command.new do
    using 'is_port_listening.ps1'
    exec "IsPortListening -portNumber #{port}"
  end
end

.check_is_listening_with_protocol(port, protocol) ⇒ Object


10
11
12
13
14
15
# File 'lib/specinfra/command/windows/base/port.rb', line 10

def check_is_listening_with_protocol(port, protocol)
  Backend::PowerShell::Command.new do
    using 'is_port_listening.ps1'
    exec "IsPortListening -portNumber #{port} -protocol '#{protocol}'"
  end
end