1 | <?php |
||
18 | class DataAlertEvent extends IoEvent |
||
19 | { |
||
20 | /** |
||
21 | * Total amount of attempts before closing connection |
||
22 | * |
||
23 | * @var int |
||
24 | */ |
||
25 | private $totalAttempts; |
||
26 | |||
27 | /** |
||
28 | * Current attempt number, the first is 1 |
||
29 | * |
||
30 | * @var int |
||
31 | */ |
||
32 | private $attempt; |
||
33 | |||
34 | /** |
||
35 | * DataAlertEvent constructor |
||
36 | * |
||
37 | * @param RequestExecutorInterface $executor Request executor object |
||
38 | * @param SocketInterface $socket Socket for this request |
||
39 | * @param mixed $context Any optional user data for event |
||
40 | * @param int $attempt Current attempt from 1 |
||
41 | * @param int $totalAttempts Total amount of attempts |
||
42 | */ |
||
43 | 7 | public function __construct( |
|
54 | |||
55 | /** |
||
56 | * Return TotalAttempts |
||
57 | * |
||
58 | * @return int |
||
59 | */ |
||
60 | 1 | public function getTotalAttempts() |
|
64 | |||
65 | /** |
||
66 | * Return Attempt |
||
67 | * |
||
68 | * @return int |
||
69 | */ |
||
70 | 1 | public function getAttempt() |
|
74 | } |
||
75 |