1 | <?php |
||
17 | abstract class AbstractIo implements IoInterface |
||
18 | { |
||
19 | /** |
||
20 | * Socket buffer size |
||
21 | */ |
||
22 | const SOCKET_BUFFER_SIZE = 8192; |
||
23 | |||
24 | /** |
||
25 | * Amount of attempts to set data |
||
26 | */ |
||
27 | const IO_ATTEMPTS = 10; |
||
28 | |||
29 | /** |
||
30 | * Socket |
||
31 | * |
||
32 | * @var SocketInterface |
||
33 | */ |
||
34 | protected $socket; |
||
35 | |||
36 | /** |
||
37 | * AbstractIo constructor. |
||
38 | * |
||
39 | * @param SocketInterface $socket Socket object |
||
40 | */ |
||
41 | 217 | public function __construct(SocketInterface $socket) |
|
45 | |||
46 | /** |
||
47 | * Return last php error message as string |
||
48 | * |
||
49 | * @return string |
||
50 | */ |
||
51 | 4 | protected function getLastPhpErrorMessage() |
|
62 | } |
||
63 |