Subversion Repositories oidplus

Rev

Rev 846 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

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