Asyncore
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Asyncore\Worker Class Reference

Public Member Functions

 __construct (&$proc, array &$pipes, callable $message_handler)
 
 isRunning ()
 
 send ($data)
 

Static Public Member Functions

static init (callable $message_handler)
 

Public Attributes

 $running_condition
 

Detailed Description

See also
Master

Constructor & Destructor Documentation

◆ __construct()

Asyncore\Worker::__construct ( $proc,
array &  $pipes,
callable  $message_handler 
)
Parameters
resource$proc
array$pipes
callable$message_handler
See also
Asyncore::worker

Member Function Documentation

◆ init()

static Asyncore\Worker::init ( callable  $message_handler)
static

Initiates the worker script and registers a message handler.

Parameters
callable$message_handlerThe function to be called when the master sends a message.
Returns
void

◆ isRunning()

Asyncore\Worker::isRunning ( )

◆ send()

Asyncore\Worker::send (   $data)

Sends an object to the worker.

Parameters
$data
Returns
Worker $this

Member Data Documentation

◆ $running_condition

Condition Asyncore\Worker::$running_condition

The Condition that is true as long as the Worker is running.