Skip to content

Commit e350a1c

Browse files
committed
Use normal stream data handler, process stream filters and any errors
1 parent 48288a8 commit e350a1c

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

src/Connection.php

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,6 @@
66

77
class Connection extends Stream implements ConnectionInterface
88
{
9-
public function handleData($stream)
10-
{
11-
// Socket is raw, not using fread as it's interceptable by filters
12-
// See issues #192, #209, and #240
13-
$data = stream_socket_recvfrom($stream, $this->bufferSize);
14-
if ('' !== $data && false !== $data) {
15-
$this->emit('data', array($data, $this));
16-
}
17-
18-
if ('' === $data || false === $data || !is_resource($stream) || feof($stream)) {
19-
$this->end();
20-
}
21-
}
22-
239
public function handleClose()
2410
{
2511
if (is_resource($this->stream)) {

0 commit comments

Comments
 (0)