Audio_PureData_ServerHandler Class Reference

List of all members.

Public Member Functions

 onReceiveData ($clientId=0, $data="")
 onConnect ($clientId=0)
 onClose ()
 addSelector ($selector, &$callback)
 setSingleHandler (&$callback)
 setPdSend (&$netsend)
 send ($data)

Public Attributes

 $_handlers
 $net_send
 $single_handler

Detailed Description

TCP server handler. This class can be overriden. No need to, you can just register callbacks.

Handles the events onReceiveData, onConnect and onClose. Calls the methods of the PhpExt object corresponding to the selectors of the Pure Data lists it receives.

You must either use the single handler method, or use one function handler for every selector.

In both cases, the first argument to the callback will be a reference to this Audio_PureData_ServerHandler object. The second argument will be an array or a string containing the data that is received from Pure Data.


Member Function Documentation

Audio_PureData_ServerHandler::onClose  ) 
 

You can override this method

Audio_PureData_ServerHandler::onConnect clientId = 0  ) 
 

You can override this method

Audio_PureData_ServerHandler::onReceiveData clientId = 0,
data = ""
 

This is where the translation from FUDI to PHP callbacks is operated.

Parameters:
integer $clientId
string $data

Audio_PureData_ServerHandler::setPdSend &$  netsend  ) 
 

Parameters:
$netsend object Audio_PureData_NetSend


The documentation for this class was generated from the following file:
Generated on Sun Jul 16 03:41:39 2006 for Audio_PureData by  doxygen 1.4.6