|
@@ 198-201 (lines=4) @@
|
| 195 |
|
|
| 196 |
|
$content = @socket_read($this->socket, $packetLength, PHP_BINARY_READ); |
| 197 |
|
|
| 198 |
|
if ($this->type == 'udp' && $content == null) { |
| 199 |
|
$this->connected = false; |
| 200 |
|
throw new RecvTimeoutException($this->getLastError()); |
| 201 |
|
} |
| 202 |
|
|
| 203 |
|
$read = new Packet($content); |
| 204 |
|
|
|
@@ 219-225 (lines=7) @@
|
| 216 |
|
|
| 217 |
|
return $read; |
| 218 |
|
} |
| 219 |
|
elseif ($select === 0) { |
| 220 |
|
if ($this->type == 'udp') { |
| 221 |
|
$this->connected = false; |
| 222 |
|
} |
| 223 |
|
|
| 224 |
|
throw new RecvTimeoutException($this->getLastError()); |
| 225 |
|
} |
| 226 |
|
else { |
| 227 |
|
$this->connected = false; |
| 228 |
|
throw new RecvDataException($this->getLastError()); |