ShmopComThe Shared Memory Communication Class
it extends the ComBasic Class and Implement it's Abstract Methods
Located in /Com/ShmopCom.php (line 27)
ComBasic | --ShmopCom
int
$id
(line 40)
Shared Memory block id (shmid)
int
$MemKey
(line 46)
Shared Memory block Key
SimpleMutex
$MuxH
(line 53)
an Instance of the Sync Class
int
$perms
= 0777 (line 34)
Shared Memory Block Permissions
PlainArrayHandler
$RecHandler
(line 59)
an Instance of the Writting Methodology Class
int
$size
= 1000 (line 65)
The Default size of the Shared memory block
Constructor ShmopCom (line 80)
The Shared Memory Communication Class Constructor
This class is called in two manners :- 1) Intializing Communication from parent thread here it's called like : $asd=new ShmopCom() and Block size can be changed latter BUT before Init is called by Process (Which is very important according to your needs as it's Constant )
2) From a called thread to start Communication with other threads ( in same process ) :$asd=new ShmopCom($Shn) where $Shn is the Shared Memory block id which must be passed from mother thread to called threads
Clear (line 197)
Shared Memory Communication Specific Clearing Function
it removes Communication Shared Memory Block to clear any used space
Delete (line 187)
This is a class Spacefic Deleting function it writes to the Shared Memory Block the Values returned from Writting Methodolgy class Deleting function
Exist (line 173)
Shared Memory Communication Specific Existance Checking Function
This function uses the Writting Methodolgy Class to do the Job directly (NO Sync. bounds)
Get (line 139)
Shared Memory Communication Specific Getting Function
This function Encapsulates Getting values through Chosen Sync Class
GetAll (line 208)
This function is specific to PlainArray Writting class it returns all contents , here it reads the Shared Memory Block and returns it
GetSize (line 177)
Gget (line 161)
This is the Value Getting function it wrraps the Writting Methodolgy Class Getting function
Gset (line 150)
This is the Class Specific Setting function it writes to the Shared Memory Block the Values returned from Writting Methodolgy class Setting function
Init (line 103)
Shared Memory Communication Specific Init Function
(For pupose of this function review ComBasic abstract class documentation)
For the ShmopCom class the role of this function is to create the shared memory block used for communication , it just picks a random key and keep iterating to find an idle one
Set (line 127)
Shared Memory Communication Specific Setting Function
This function Encapsulates Setting values through Chosen Sync Class
Inherited From ComBasic
ComBasic::Clear()
ComBasic::Exist()
ComBasic::Get()
ComBasic::Init()
ComBasic::Set()
Documentation generated on Fri, 01 Aug 2008 05:54:16 +0300 by phpDocumentor 1.4.1