patMisc < patSHMC >  



patShmc is short for "pat Shared Memory Connectivity".
patSHMC is a class which was originally developed for a shared memory chat and improved for our article about IPC in the first issue of the German "PHP Magazin". It helps you to build a communication between several PHP scripts running on the same server by supplying a wrapper class for PHP's shm_ and sem_ functions and implements a simple locking mechanism.
Current Version : v0.1
Released : 2002-03-29
Maintainer : Stephan Schmidt
Developer(s) : Stephan Schmidt
License : LGPL

Why should I use patSHMC?
If you have already been working with PHP's shared memory and semaphore functions you probably know, that they are quite hard to handle as you will need at least two keys and two resource ids and always have to rememeber which function takes a key or a resource. Furthermore you have to use a semaphore to block a shared memory segment before accessing it.
This is were patSHMC is quite helpful. Once you've created a new patSHMC object, you will not need any keys or ids . Just use patSHMC's methods to lock/unlock the shared memory segment or get a variable from it...
Is there documentation available?
As patSHMC is quite small, there's only inline documentation . If you are capable of understanding german you could check out the German "PHP Magazin" issue 1 as there is an article by Stephan Schmidt and Gerd Schaufelberger which also discusses patSHMC.
Select an archive type to download
TypeFilenameFilesizeDescription
patSHMC.zip1,28 KByte
patSHMC.tar.bz21,10 KByte
patSHMC.tar.gz1,01 KByte

Partnersites
PHP Application Tools

© 2001-2006
pat is watching you!

Last Updated: 2004-03-24 00:56:03 Jump to the top of the page (of course only if you're far enough down...)