Ferreteria/v0.6/clade/Sys/InOut/Connx/Stream/@code/cur/2026/01/08

From WoozleCodes
Jump to navigation Jump to search
2026/01/07 2026/01/08 2026/01/09
interface iStream extends BaseIface, RdouterIface {
    // STATUS
    function MoreBytes() : bool;
    function NPulledBytes() : int;   // bytes already processed/transferred (read or written)
    // ACTION (I/O)
    function PullBytes(int $nMax=NULL) : CommOpIface;
    function PushBytes(string $s) : int|null;          // add on as new bytes
}
abstract class caStream extends BaseClass implements iStream {
    use RdouterTrait;

    // ++ CONFIG ++ //

    protected function InspectorClass() : string { return InspectClass::class; }

    // -- CONFIG -- //
    // ++ STATUS ++ //

    protected $nPulled = 0;
    public function NPulledBytes() : int { return $this->nPulled; }
    protected function ResetPulled() { $this->nPulled = 0; }

    // -- STATUS -- //
}