Class: Selenium::WebDriver::SocketPoller
- Inherits:
-
Object
- Object
- Selenium::WebDriver::SocketPoller
- Defined in:
- rb/lib/selenium/webdriver/common/socket_poller.rb
Instance Method Summary collapse
-
#closed? ⇒ Boolean
Returns true if the server has stopped listening within the given timeout, false otherwise.
-
#connected? ⇒ Boolean
Returns true if the server is listening within the given timeout, false otherwise.
-
#initialize(host, port, timeout = 0, interval = 0.25) ⇒ SocketPoller
constructor
A new instance of SocketPoller.
Constructor Details
#initialize(host, port, timeout = 0, interval = 0.25) ⇒ SocketPoller
Returns a new instance of SocketPoller.
26 27 28 29 30 31 |
# File 'rb/lib/selenium/webdriver/common/socket_poller.rb', line 26 def initialize(host, port, timeout = 0, interval = 0.25) @host = host @port = Integer(port) @timeout = Float(timeout) @interval = interval end |
Instance Method Details
#closed? ⇒ Boolean
Returns true if the server has stopped listening within the given timeout, false otherwise.
51 52 53 |
# File 'rb/lib/selenium/webdriver/common/socket_poller.rb', line 51 def closed? with_timeout { !listening? } end |
#connected? ⇒ Boolean
Returns true if the server is listening within the given timeout, false otherwise.
40 41 42 |
# File 'rb/lib/selenium/webdriver/common/socket_poller.rb', line 40 def connected? with_timeout { listening? } end |