• Home
  • Raw
  • Download

Lines Matching full:timeout

30 - timeout should be intrinsic to the connection object instead of an
150 read_until(expected, [timeout])
151 Read until the expected string has been seen, or a timeout is
152 hit (default is no timeout); may block.
189 timeout=socket._GLOBAL_DEFAULT_TIMEOUT): argument
194 and timeout are optional.
199 self.timeout = timeout
211 self.open(host, port, timeout)
213 def open(self, host, port=0, timeout=socket._GLOBAL_DEFAULT_TIMEOUT): argument
226 self.timeout = timeout
227 self.sock = socket.create_connection((host, port), timeout)
285 def read_until(self, match, timeout=None): argument
286 """Read until a given string is encountered or until timeout.
294 return self._read_until_with_poll(match, timeout)
296 return self._read_until_with_select(match, timeout)
298 def _read_until_with_poll(self, match, timeout): argument
299 """Read until a given string is encountered or until timeout.
301 This method uses select.poll() to implement the timeout.
304 call_timeout = timeout
305 if timeout is not None:
316 # Poll takes its timeout in milliseconds.
317 ready = poller.poll(None if timeout is None
321 if timeout is not None:
323 call_timeout = timeout-elapsed
332 if timeout is not None:
334 if elapsed >= timeout:
336 call_timeout = timeout-elapsed
345 def _read_until_with_select(self, match, timeout=None): argument
346 """Read until a given string is encountered or until timeout.
348 The timeout is implemented using select.select().
360 if timeout is not None:
361 s_args = s_args + (timeout,)
374 if timeout is not None:
376 if elapsed >= timeout:
378 s_args = s_reply + (timeout-elapsed,)
630 def expect(self, list, timeout=None): argument
635 The optional second argument is a timeout, in seconds; default
636 is no timeout.
645 timeout happened).
653 return self._expect_with_poll(list, timeout)
655 return self._expect_with_select(list, timeout)
657 def _expect_with_poll(self, expect_list, timeout=None): argument
660 This method uses select.poll() to implement the timeout.
669 call_timeout = timeout
670 if timeout is not None:
688 ready = poller.poll(None if timeout is None
692 if timeout is not None:
694 call_timeout = timeout-elapsed
708 if timeout is not None:
710 if elapsed >= timeout:
712 call_timeout = timeout-elapsed
721 def _expect_with_select(self, list, timeout=None): argument
724 The timeout is implemented using select.select().
733 if timeout is not None:
747 if timeout is not None:
749 if elapsed >= timeout:
751 s_args = ([self.fileno()], [], [], timeout-elapsed)
786 tn.open(host, port, timeout=0.5)