Ferreteria/v0.6/fx/OSock: Difference between revisions

From Woozle Writes Code
< Ferreteria‎ | v0.6‎ | fx
Jump to navigation Jump to search
(Created page with "{{page/fx}} ==About== * '''Purpose''': access to the current object's {{l/ver/clade|IO\Aspect|Socket}} object * '''Definitions''': ** '''A''': <code>protected function OSock() : {{l/ver/clade|IO\Aspect\Socket|SockIface}}</code> ** '''B''': <code>public function OSock() : {{l/ver/clade|IO\Aspect\Socket|SockIface}}</code> ==Usage== {| class="wikitable sortable" ! clade || require || implement || call || notes {{!-!}} <code>{{l/ver/clade/full|IO\Aspect\Connx|Plug}}</code> |...")
 
mNo edit summary
 
(2 intermediate revisions by the same user not shown)
Line 3: Line 3:
* '''Purpose''': access to the current object's {{l/ver/clade|IO\Aspect|Socket}} object
* '''Purpose''': access to the current object's {{l/ver/clade|IO\Aspect|Socket}} object
* '''Definitions''':
* '''Definitions''':
** '''A''': <code>protected function OSock() : {{l/ver/clade|IO\Aspect\Socket|SockIface}}</code>
** '''A''': <code>protected function OSock() : {{l/ver/clade|IO\Aspect|Socket|SockIface}}</code>
** '''B''': <code>public function OSock() : {{l/ver/clade|IO\Aspect\Socket|SockIface}}</code>
** '''B''': <code>public function OSock() : {{l/ver/clade|IO\Aspect|Socket|SockIface}}</code>
==Usage==
==Usage==
{| class="wikitable sortable"
{| class="wikitable sortable"
! clade || require || implement || call || notes
! clade || require || implement || call / notes
{{!-!}} <code>{{l/ver/clade/full|IO\Aspect\Connx|Plug}}</code>
{{!-!}} <code>{{l/ver/clade/full|IO\Aspect\Connx|Plug}}</code>
|
|
| <code>return $this->oSock;</code>
| {{fmt/php/inline|1=return $this->oSock;}}
| <code>$this->oSock</code> is set by <code>{{l/ver/fx|WithSocket}}()</code>
| <code>$this->oSock</code> is set by <code>{{l/ver/fx|WithSocket}}()</code>


Line 33: Line 33:


{{!-!}} <code>{{l/ver/clade/full|Sys\Data\Engine|Conn}}</code>
{{!-!}} <code>{{l/ver/clade/full|Sys\Data\Engine|Conn}}</code>
| <code>function OSock() : SockIface;</code>
| <code>function {{l/ver/fx|OSock}}() : {{l/ver/clade|IO\Aspect|Socket|SockIface}};</code>
| {{fmt/php/inline|1=return $this->oSock;}}
| {{fmt/php/inline|1=return $this->oSock;}}
| in <code>{{l/ver/fx|Inspect}}()</code>: <code>return new ($this->{{l/ver/fx|InspectorClass}}())($this,$this->{{l/ver/fx|OSock}}(),$this->{{l/ver/fx|OSock}}()->{{l/ver/fx|OCred}}(),$this);
| in <code>{{l/ver/fx|Inspect}}()</code>: <code>return new ($this->{{l/ver/fx|InspectorClass}}())($this,$this->{{l/ver/fx|OSock}}(),$this->{{l/ver/fx|OSock}}()->{{l/ver/fx|OCred}}(),$this);
{{!-!}} <code>{{l/ver/clade/full|Sys\Data\Engine\Conn|MyMar}}</code>
|
| {{fmt/php/inline|1=return $this->oSock;}}
|<poem>
in <code>{{l/ver/fx|DoCommand}}()</code>: <code>$oPlug = $this->{{l/ver/fx|OSock}}()->{{l/ver/fx|OPlug}}();</code>
in <code>{{l/ver/fx|CredsForCmd}}()</code>: <code>$oSock = $this->{{l/ver/fx|OSock}}();  // DB connection-from-endpoint socket</code>
in <code>{{l/ver/fx|DescribeInline}}()</code>: 2 calls, building description
in <code>{{l/ver/fx|ActualOpen}}()</code>: to get Socket's Plug and Host
in <code>{{l/ver/fx|ActualShut}}()</code>: <code>$this->{{l/ver/fx|OSock}}()->{{l/ver/fx|OConn}}()->{{l/ver/fx|Shut}}();</code>
</poem>
{{!-!}} <code>{{l/ver/clade/full|Sys\Data\Engine\Oper|MyMar}}</code>
|
|
|<poem>
in <code>{{l/ver/fx|NewSchemaList}}()</code>: <code>$oPlug = $oConn->{{l/ver/fx|OSock}}()->{{l/ver/fx|OPlug}}();</code>
in <code>{{l/ver/fx|DoExport}}()</code>: <code>$oSockDB = $oConnDB->{{l/ver/fx|OSock}}();</code>
</poem>
{{!-!}} <code>{{l/ver/clade/full|Sys\Data\Engine\schema\Ops|MyMar}}</code>
|
|
| in <code>{{l/ver/fx|DoImport}}()</code>: <code>$oConnx = $oDbConn->OSock();</code>
|}
|}
(2025-12-04 {{hashtag|TODO}}: documentation in progress)

Latest revision as of 00:45, 5 December 2025

About

  • Purpose: access to the current object's Socket object
  • Definitions:

Usage

clade require implement call / notes
IO\Aspect\Connx\Plug return $this->oSock; $this->oSock is set by WithSocket()
IO\Aspect\Connx\Plug\Chain

in ActualOpen(): $oPlug = $this->OSock()->OPlug();
in ActualShut(): $oPlug = $this->OSock()->OPlug(); - to call $oPlug->ActualShut()
in ForwardCommand(): return $this->OSock()->OPlug()->DoCommand($saCmd,$oBuff,$oAct);
in DescribeInline(): return $this->OSock()->DescribeInline();

IO\Aspect\Connx\Plug\Shell\Remote\SSH

in OCred(): return $this->OSock()->OCred();
in ActualOpen(): $oSock = $this->OSock();
in WrapCommand(): $oSock = $this->OSock();

Sys\Data\Engine\Conn function OSock() : SockIface; return $this->oSock; in Inspect(): return new ($this->InspectorClass())($this,$this->OSock(),$this->OSock()->OCred(),$this);
Sys\Data\Engine\Conn\MyMar return $this->oSock;

in DoCommand(): $oPlug = $this->OSock()->OPlug();
in CredsForCmd(): $oSock = $this->OSock(); // DB connection-from-endpoint socket
in DescribeInline(): 2 calls, building description
in ActualOpen(): to get Socket's Plug and Host
in ActualShut(): $this->OSock()->OConn()->Shut();

Sys\Data\Engine\Oper\MyMar

in NewSchemaList(): $oPlug = $oConn->OSock()->OPlug();
in DoExport(): $oSockDB = $oConnDB->OSock();

Sys\Data\Engine\schema\Ops\MyMar in DoImport(): $oConnx = $oDbConn->OSock();