Req #18017 [Opn]: Signature for sendData() not the same in all drivers.
| From: | mikyter at gmail dot com | Date: | Mon, 01 Nov 2010 11:52:59 +0000 |
| Subject: | Req #18017 [Opn]: Signature for sendData() not the same in all drivers. | ||
| References: | 1 | Groups: | php.pear.bugs |
| Request: | Send a blank email to pear-bugs+get-5012@lists.php.net to get a copy of this message | ||
Edit report at http://pear.php.net/bugs/bug.php?id=18017&edit=1
ID: 18017
Updated by: mikyter@gmail.com
Reported By: mikyter at gmail dot com
Summary: Signature for sendData() not the same in all drivers.
Status: Open
Type: Feature/Change Request
Package: Net_Server
Operating System: All
Package Version: 1.0.2
PHP Version: Irrelevant
Roadmap Versions:
New Comment:
Sorry, got confused by the parameters...
It actually works but you can't turn off debugging, if you call the
sendData() method of the fork driver with a client id.
Previous Comments:
------------------------------------------------------------------------
[2010-10-31 21:29:09] mikyter
Description:
------------
The method sendData() has different parameters in the fork and
sequential driver.
Test script:
---------------
class Net_Server_Test extends Net_Server_Handler {
function onReceiveData($clientId = 0, $data = '') {
$this->_server->sendData($clientId, 'You said: ' . $data);
}
}
Expected result:
----------------
When the client sends "Hello" to the server, it answers with "You said:
Hello".
Actual result:
--------------
With the sequential driver it works. If you use the fork driver, the
server answers with "0".
------------------------------------------------------------------------
--
Edit this bug report at http://pear.php.net/bugs/bug.php?id=18017&edit=1