1 | <?php |
||
15 | class SslHandshakeOperation implements OperationInterface |
||
16 | { |
||
17 | /** |
||
18 | * Cipher to use for SSL encryption |
||
19 | * |
||
20 | * @var int |
||
21 | */ |
||
22 | private $cipher; |
||
23 | |||
24 | /** |
||
25 | * I/O operation after handshake will complete |
||
26 | * |
||
27 | * @var OperationInterface |
||
28 | */ |
||
29 | private $nextOperation; |
||
30 | |||
31 | /** |
||
32 | * SslHandshakeOperation constructor. |
||
33 | * |
||
34 | * @param OperationInterface $nextOperation I/O operation after handshake will complete |
||
35 | * @param int $cipher Cipher to use for SSL encryption |
||
36 | */ |
||
37 | 4 | public function __construct(OperationInterface $nextOperation = null, $cipher = STREAM_CRYPTO_METHOD_TLS_CLIENT) |
|
42 | |||
43 | /** {@inheritdoc} */ |
||
44 | 5 | public function getTypes() |
|
45 | { |
||
46 | 5 | return [self::OPERATION_WRITE]; |
|
47 | } |
||
48 | |||
49 | /** |
||
50 | * Return Cipher |
||
51 | * |
||
52 | * @return int |
||
53 | */ |
||
54 | 4 | public function getCipher() |
|
58 | |||
59 | /** |
||
60 | * Return NextOperation |
||
61 | * |
||
62 | * @return OperationInterface |
||
63 | */ |
||
64 | 2 | public function getNextOperation() |
|
68 | } |
||
69 |