Ferreteria/v0.6/clade/IO/Aspect/Connx/Stream/Runner/Remote/@removed
Jump to navigation
Jump to search
|
Removed Code
|
2026-02-17
Commented out probably around 2026-02-09:
#
public function HasBytes() : bool {
// This is a little sloppy, but hopefully will work ok-enough for now:
return $this->didHave;
// 2026-02-10 Copilot *insists* this should work, i.e. feof() will only become TRUE when the remote process exits.
// ...but in actual usage, it never flips to TRUE.
#return !feof($this->RNative());
}
// 2026-02-09 moved here from Native/File/Generic
// ...but actually belongs there; I was confused.
public function PullBytes(int $nMax=NULL) : CommOpIface {
$rStrm = $this->RNative();
$this->AmHere('PullBytes: STREAM TYPE: '.get_resource_type($rStrm));
$bs = @stream_get_contents($rStrm,$nMax);
$this->didHave = (strlen($bs) > 0);
$oOp = new CommOpClass;
$oOp->SetOkay(is_string($bs));
if (is_string($bs)) {
if ($bs !== '') {
$oOp->QData()->SetIt($bs);
}
}
return $oOp;
}
2026-01-31
Commented out today:
#
// 2026-01-31 These are now handled in Entry.
private $oCreds=NULL;
public function OCred(?CredsIface $o=NULL) : CredsIface { return is_null($o) ? $this->oCreds : ($this->oCreds = $o); }
private $oHost=NULL;
public function OHost(?HostIface $o=NULL) : HostIface { return is_null($o) ? $this->oHost : ($this->oHost = $o); }
2025-05-27
#
// ++ ACTION ++ //
// 2025-03-16 This succeeds in opening the tunnel (if sudo is invoked), but then the tunnel isn't used.
public function DoCommand(string|array $sCmd, BufferIface $oBuff) : CommOpIface {
$oScrn = $this->Screen();
$oAct = $this->NewAction();
#echo $this->Creds()->ReflectThis()->Report();
// ++ TUNNEL
#echo "Opening tunnel to $sSHost...".CRLF;
// 2025-03-16 If this works, then I think it must be an accidental kluge from earlier. TODO: fix later.
$oCreds = $this->Creds();
$oTunn = $this->NewTunnel($oCreds);
$oAct = $oTunn->Open();
echo ($oAct->GetOkay() ? $oScrn->GreenIt('Opened.') : ($oScrn->ErrorIt('Error: ').$oAct->GetMessage())).CRLF;
// -- TUNNEL
$oAct = parent::DoCommand($sCmd,$oBuff); // NOT TESTED
return $oAct;
}
// -- ACTION -- //