public function setWindowSize($height, $width) {
        if (!is_int($height) || !is_int($width)) {
            throw new TelnetException("Wrong windows height or width used. Should valid integer.");
        }

        if ($height < 1 || $width < 1 || $height === 255 || $width === 255) {
            throw new TelnetException("Window size can't be negative or 255");
        }

        $this->winsize_height = $height;
        $this->winsize_widht = $width;

        return $this;
    }