1 | <?php declare(strict_types=1); |
||
17 | abstract class Connection extends AbstractResource implements ConnectionInterface |
||
18 | { |
||
19 | /** |
||
20 | * @var int |
||
21 | */ |
||
22 | protected $recv_oct; |
||
23 | |||
24 | /** |
||
25 | * @var int |
||
26 | */ |
||
27 | protected $send_oct; |
||
28 | |||
29 | /** |
||
30 | * @var Details |
||
31 | */ |
||
32 | protected $recv_oct_details; |
||
33 | |||
34 | /** |
||
35 | * @var Details |
||
36 | */ |
||
37 | protected $send_oct_details; |
||
38 | |||
39 | /** |
||
40 | * @var int |
||
41 | */ |
||
42 | protected $recv_cnt; |
||
43 | |||
44 | /** |
||
45 | * @var int |
||
46 | */ |
||
47 | protected $send_cnt; |
||
48 | |||
49 | /** |
||
50 | * @var int |
||
51 | */ |
||
52 | protected $send_pend; |
||
53 | |||
54 | /** |
||
55 | * @var string |
||
56 | */ |
||
57 | protected $state; |
||
58 | |||
59 | /** |
||
60 | * @var int |
||
61 | */ |
||
62 | protected $channels; |
||
63 | |||
64 | /** |
||
65 | * @var string |
||
66 | */ |
||
67 | protected $type; |
||
68 | |||
69 | /** |
||
70 | * @var string |
||
71 | */ |
||
72 | protected $node; |
||
73 | |||
74 | /** |
||
75 | * @var string |
||
76 | */ |
||
77 | protected $name; |
||
78 | |||
79 | /** |
||
80 | * @var int |
||
81 | */ |
||
82 | protected $port; |
||
83 | |||
84 | /** |
||
85 | * @var int |
||
86 | */ |
||
87 | protected $peer_port; |
||
88 | |||
89 | /** |
||
90 | * @var string |
||
91 | */ |
||
92 | protected $host; |
||
93 | |||
94 | /** |
||
95 | * @var string |
||
96 | */ |
||
97 | protected $peer_host; |
||
98 | |||
99 | /** |
||
100 | * @var bool |
||
101 | */ |
||
102 | protected $ssl; |
||
103 | |||
104 | /** |
||
105 | * @var mixed |
||
106 | */ |
||
107 | protected $peer_cert_subject; |
||
108 | |||
109 | /** |
||
110 | * @var mixed |
||
111 | */ |
||
112 | protected $peer_cert_issuer; |
||
113 | |||
114 | /** |
||
115 | * @var mixed |
||
116 | */ |
||
117 | protected $peer_cert_validity; |
||
118 | |||
119 | /** |
||
120 | * @var string |
||
121 | */ |
||
122 | protected $auth_mechanism; |
||
123 | |||
124 | /** |
||
125 | * @var mixed |
||
126 | */ |
||
127 | protected $ssl_protocol; |
||
128 | |||
129 | /** |
||
130 | * @var mixed |
||
131 | */ |
||
132 | protected $ssl_key_exchange; |
||
133 | |||
134 | /** |
||
135 | * @var mixed |
||
136 | */ |
||
137 | protected $ssl_cipher; |
||
138 | |||
139 | /** |
||
140 | * @var mixed |
||
141 | */ |
||
142 | protected $ssl_hash; |
||
143 | |||
144 | /** |
||
145 | * @var string |
||
146 | */ |
||
147 | protected $protocol; |
||
148 | |||
149 | /** |
||
150 | * @var string |
||
151 | */ |
||
152 | protected $user; |
||
153 | |||
154 | /** |
||
155 | * @var string |
||
156 | */ |
||
157 | protected $vhost; |
||
158 | |||
159 | /** |
||
160 | * @var int |
||
161 | */ |
||
162 | protected $timeout; |
||
163 | |||
164 | /** |
||
165 | * @var int |
||
166 | */ |
||
167 | protected $frame_max; |
||
168 | |||
169 | /** |
||
170 | * @var int |
||
171 | */ |
||
172 | protected $channel_max; |
||
173 | |||
174 | /** |
||
175 | * @var Connection\ClientProperties |
||
176 | */ |
||
177 | protected $client_properties; |
||
178 | |||
179 | /** |
||
180 | * @var int |
||
181 | */ |
||
182 | protected $connected_at; |
||
183 | |||
184 | /** |
||
185 | * @return int |
||
186 | */ |
||
187 | public function recvOct(): int |
||
188 | { |
||
189 | return $this->recv_oct; |
||
190 | } |
||
191 | |||
192 | /** |
||
193 | * @return int |
||
194 | */ |
||
195 | public function sendOct(): int |
||
196 | { |
||
197 | return $this->send_oct; |
||
198 | } |
||
199 | |||
200 | /** |
||
201 | * @return Details |
||
202 | */ |
||
203 | public function recvOctDetails(): Details |
||
207 | |||
208 | /** |
||
209 | * @return Details |
||
210 | */ |
||
211 | public function sendOctDetails(): Details |
||
215 | |||
216 | /** |
||
217 | * @return int |
||
218 | */ |
||
219 | public function recvCnt(): int |
||
220 | { |
||
221 | return $this->recv_cnt; |
||
222 | } |
||
223 | |||
224 | /** |
||
225 | * @return int |
||
226 | */ |
||
227 | public function sendCnt(): int |
||
228 | { |
||
229 | return $this->send_cnt; |
||
230 | } |
||
231 | |||
232 | /** |
||
233 | * @return int |
||
234 | */ |
||
235 | public function sendPend(): int |
||
236 | { |
||
237 | return $this->send_pend; |
||
238 | } |
||
239 | |||
240 | /** |
||
241 | * @return string |
||
242 | */ |
||
243 | public function state(): string |
||
244 | { |
||
245 | return $this->state; |
||
246 | } |
||
247 | |||
248 | /** |
||
249 | * @return int |
||
250 | */ |
||
251 | public function channels(): int |
||
252 | { |
||
253 | return $this->channels; |
||
254 | } |
||
255 | |||
256 | /** |
||
257 | * @return string |
||
258 | */ |
||
259 | public function type(): string |
||
260 | { |
||
261 | return $this->type; |
||
262 | } |
||
263 | |||
264 | /** |
||
265 | * @return string |
||
266 | */ |
||
267 | public function node(): string |
||
268 | { |
||
269 | return $this->node; |
||
270 | } |
||
271 | |||
272 | /** |
||
273 | * @return string |
||
274 | */ |
||
275 | public function name(): string |
||
276 | { |
||
277 | return $this->name; |
||
278 | } |
||
279 | |||
280 | /** |
||
281 | * @return int |
||
282 | */ |
||
283 | public function port(): int |
||
284 | { |
||
285 | return $this->port; |
||
286 | } |
||
287 | |||
288 | /** |
||
289 | * @return int |
||
290 | */ |
||
291 | public function peerPort(): int |
||
292 | { |
||
293 | return $this->peer_port; |
||
294 | } |
||
295 | |||
296 | /** |
||
297 | * @return string |
||
298 | */ |
||
299 | public function host(): string |
||
300 | { |
||
301 | return $this->host; |
||
302 | } |
||
303 | |||
304 | /** |
||
305 | * @return string |
||
306 | */ |
||
307 | public function peerHost(): string |
||
308 | { |
||
309 | return $this->peer_host; |
||
310 | } |
||
311 | |||
312 | /** |
||
313 | * @return bool |
||
314 | */ |
||
315 | public function ssl(): bool |
||
316 | { |
||
317 | return $this->ssl; |
||
318 | } |
||
319 | |||
320 | /** |
||
321 | * @return mixed |
||
322 | */ |
||
323 | public function peerCertSubject(): mixed |
||
327 | |||
328 | /** |
||
329 | * @return mixed |
||
330 | */ |
||
331 | public function peerCertIssuer(): mixed |
||
335 | |||
336 | /** |
||
337 | * @return mixed |
||
338 | */ |
||
339 | public function peerCertValidity(): mixed |
||
343 | |||
344 | /** |
||
345 | * @return string |
||
346 | */ |
||
347 | public function authMechanism(): string |
||
348 | { |
||
349 | return $this->auth_mechanism; |
||
350 | } |
||
351 | |||
352 | /** |
||
353 | * @return mixed |
||
354 | */ |
||
355 | public function sslProtocol(): mixed |
||
359 | |||
360 | /** |
||
361 | * @return mixed |
||
362 | */ |
||
363 | public function sslKeyExchange(): mixed |
||
367 | |||
368 | /** |
||
369 | * @return mixed |
||
370 | */ |
||
371 | public function sslCipher(): mixed |
||
375 | |||
376 | /** |
||
377 | * @return mixed |
||
378 | */ |
||
379 | public function sslHash(): mixed |
||
383 | |||
384 | /** |
||
385 | * @return string |
||
386 | */ |
||
387 | public function protocol(): string |
||
388 | { |
||
389 | return $this->protocol; |
||
390 | } |
||
391 | |||
392 | /** |
||
393 | * @return string |
||
394 | */ |
||
395 | public function user(): string |
||
396 | { |
||
397 | return $this->user; |
||
398 | } |
||
399 | |||
400 | /** |
||
401 | * @return string |
||
402 | */ |
||
403 | public function vhost(): string |
||
404 | { |
||
405 | return $this->vhost; |
||
406 | } |
||
407 | |||
408 | /** |
||
409 | * @return int |
||
410 | */ |
||
411 | public function timeout(): int |
||
412 | { |
||
413 | return $this->timeout; |
||
414 | } |
||
415 | |||
416 | /** |
||
417 | * @return int |
||
418 | */ |
||
419 | public function frameMax(): int |
||
420 | { |
||
421 | return $this->frame_max; |
||
422 | } |
||
423 | |||
424 | /** |
||
425 | * @return int |
||
426 | */ |
||
427 | public function channelMax(): int |
||
428 | { |
||
429 | return $this->channel_max; |
||
430 | } |
||
431 | |||
432 | /** |
||
433 | * @return Connection\ClientProperties |
||
434 | */ |
||
435 | public function clientProperties(): Connection\ClientProperties |
||
439 | |||
440 | /** |
||
441 | * @return int |
||
442 | */ |
||
443 | public function connectedAt(): int |
||
444 | { |
||
445 | return $this->connected_at; |
||
446 | } |
||
447 | } |
||
448 |