Changeset 305
- Timestamp:
- 12/10/08 02:32:08 (5 years ago)
- Files:
-
- 1 modified
-
branches/2.0.0/Phergie/Driver/Streams.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/2.0.0/Phergie/Driver/Streams.php
r301 r305 30 30 */ 31 31 private $_debug = false; 32 33 /** 34 * Delay between ticks in microseconds, used to prevent CPU and memory 35 * thrashing 36 * 37 * @var int 38 */ 39 private $_delay = 50000; 40 41 /** 42 * Sets a delay in microseconds between reads, used to prevent CPU and 43 * memory thrashing. 44 * 45 * @param int $delay 46 * @return Phergie_Bot Provides a fluent interface 47 */ 48 public function setDelay($delay) 49 { 50 $this->_delay = (int) $delay; 51 52 return $this; 53 } 32 54 33 55 /** … … 277 299 trigger_error('Unable to connect to server: socket error ' . $errno . ' ' . $errstr, E_USER_ERROR); 278 300 } 279 stream_set_ blocking($this->_socket, false);301 stream_set_timeout($this->_socket, $this->_delay); 280 302 281 303 // Send the password if one is specified