Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/Socket.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public function resume()
public function onReceive()
{
try {
$data = $this->handleReceive($peer);
list($data, $peer) = $this->handleReceive();
}
catch (Exception $e) {
// emit error message and local socket
Expand Down Expand Up @@ -111,7 +111,7 @@ private function sanitizeAddress($address)
return $address;
}

protected function handleReceive(&$peerAddress)
protected function handleReceive()
{
$data = stream_socket_recvfrom($this->socket, $this->bufferSize, 0, $peerAddress);

Expand All @@ -125,7 +125,7 @@ protected function handleReceive(&$peerAddress)

$peerAddress = $this->sanitizeAddress($peerAddress);

return $data;
return array($data, $peerAddress);
}

protected function handleClose()
Expand Down