From 3382a1844afb206cac064252f6b8b50115bf72bb Mon Sep 17 00:00:00 2001 From: Demin Yin Date: Tue, 15 Sep 2020 17:12:52 -0700 Subject: [PATCH] updates for Swoole 4.5.4 --- output/swoole/constants.php | 15 +++++++++++---- output/swoole_library/src/core/ArrayObject.php | 16 ++++++++++++++++ output/swoole_library/src/core/Constant.php | 6 ++++-- 3 files changed, 31 insertions(+), 6 deletions(-) diff --git a/output/swoole/constants.php b/output/swoole/constants.php index 93937fb3..01cc2e9f 100644 --- a/output/swoole/constants.php +++ b/output/swoole/constants.php @@ -1,10 +1,10 @@ get($key); } + /** + * @return null|int|string + */ + public function firstKey() + { + return array_key_first($this->array); + } + + /** + * @return null|int|string + */ + public function lastKey() + { + return array_key_last($this->array); + } + /** * @return mixed */ diff --git a/output/swoole_library/src/core/Constant.php b/output/swoole_library/src/core/Constant.php index 252667d5..b6dae8e8 100644 --- a/output/swoole_library/src/core/Constant.php +++ b/output/swoole_library/src/core/Constant.php @@ -108,8 +108,6 @@ class Constant public const OPTION_ENABLE_COROUTINE = 'enable_coroutine'; - public const OPTION_SSL_METHOD = 'ssl_method'; - public const OPTION_SSL_PROTOCOLS = 'ssl_protocols'; public const OPTION_SSL_COMPRESS = 'ssl_compress'; @@ -366,6 +364,10 @@ class Constant public const OPTION_OPEN_WEBSOCKET_CLOSE_FRAME = 'open_websocket_close_frame'; + public const OPTION_OPEN_WEBSOCKET_PING_FRAME = 'open_websocket_ping_frame'; + + public const OPTION_OPEN_WEBSOCKET_PONG_FRAME = 'open_websocket_pong_frame'; + public const OPTION_OPEN_HTTP2_PROTOCOL = 'open_http2_protocol'; public const OPTION_OPEN_REDIS_PROTOCOL = 'open_redis_protocol';