-
Notifications
You must be signed in to change notification settings - Fork 388
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
9 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ | |
* * | ||
* hprose socket Service library for php 5.3+ * | ||
* * | ||
* LastModified: Sep 17, 2016 * | ||
* LastModified: Dec 21, 2016 * | ||
* Author: Ma Bingyao <[email protected]> * | ||
* * | ||
\**********************************************************/ | ||
|
@@ -248,12 +248,16 @@ private function accept($server) { | |
$this->onReceives[(int)$socket] = $this->getOnReceive($server, $socket); | ||
} | ||
private function read($socket) { | ||
$onReceive = $this->onReceives[(int)$socket]; | ||
$onReceive(); | ||
if (isset($this->onReceives[(int)$socket])) { | ||
$onReceive = $this->onReceives[(int)$socket]; | ||
$onReceive(); | ||
} | ||
} | ||
private function write($socket) { | ||
$onSend = $this->onSends[(int)$socket]; | ||
$onSend(); | ||
if (isset($this->onSends[(int)$socket])) { | ||
$onSend = $this->onSends[(int)$socket]; | ||
$onSend(); | ||
} | ||
} | ||
private function close($socket, $context) { | ||
$this->removeSocket($this->writeableSockets, $socket); | ||
|