Rev 874 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 874 | Rev 1042 | ||
---|---|---|---|
Line 3... | Line 3... | ||
3 | /** |
3 | /** |
4 | * ReadBytes trait |
4 | * ReadBytes trait |
5 | * |
5 | * |
6 | * PHP version 5 |
6 | * PHP version 5 |
7 | * |
7 | * |
8 | * @category System |
- | |
9 | * @package SSH |
- | |
10 | * @author Jim Wigginton <terrafrost@php.net> |
8 | * @author Jim Wigginton <terrafrost@php.net> |
11 | * @copyright 2015 Jim Wigginton |
9 | * @copyright 2015 Jim Wigginton |
12 | * @license http://www.opensource.org/licenses/mit-license.html MIT License |
10 | * @license http://www.opensource.org/licenses/mit-license.html MIT License |
13 | * @link http://phpseclib.sourceforge.net |
11 | * @link http://phpseclib.sourceforge.net |
14 | */ |
12 | */ |
Line 16... | Line 14... | ||
16 | namespace phpseclib3\System\SSH\Common\Traits; |
14 | namespace phpseclib3\System\SSH\Common\Traits; |
17 | 15 | ||
18 | /** |
16 | /** |
19 | * ReadBytes trait |
17 | * ReadBytes trait |
20 | * |
18 | * |
21 | * @package SSH |
- | |
22 | * @author Jim Wigginton <terrafrost@php.net> |
19 | * @author Jim Wigginton <terrafrost@php.net> |
23 | * @access public |
- | |
24 | */ |
20 | */ |
25 | trait ReadBytes |
21 | trait ReadBytes |
26 | { |
22 | { |
27 | /** |
23 | /** |
28 | * Read data |
24 | * Read data |
29 | * |
25 | * |
30 | * @param int $length |
26 | * @param int $length |
31 | * @throws \RuntimeException on connection errors |
27 | * @throws \RuntimeException on connection errors |
32 | * @access public |
- | |
33 | */ |
28 | */ |
34 | public function readBytes($length) |
29 | public function readBytes($length) |
35 | { |
30 | { |
36 | $temp = fread($this->fsock, $length); |
31 | $temp = fread($this->fsock, $length); |
37 | if (strlen($temp) != $length) { |
32 | if (strlen($temp) != $length) { |