Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F1841514
swoole_websocket.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
swoole_websocket.php
View Options
<?php
return
[
/*
|--------------------------------------------------------------------------
| Websocket handler for onOpen and onClose callback
| Replace this handler if you want to customize your websocket handler
|--------------------------------------------------------------------------
*/
'handler'
=>
SwooleTW\Http\Websocket\SocketIO\WebsocketHandler
::
class
,
/*
|--------------------------------------------------------------------------
| Default frame parser
| Replace it if you want to customize your websocket payload
|--------------------------------------------------------------------------
*/
'parser'
=>
SwooleTW\Http\Websocket\SocketIO\SocketIOParser
::
class
,
/*
|--------------------------------------------------------------------------
| Websocket route file path
|--------------------------------------------------------------------------
*/
'route_file'
=>
base_path
(
'routes/websocket.php'
),
/*
|--------------------------------------------------------------------------
| Default middleware for on connect request
|--------------------------------------------------------------------------
*/
'middleware'
=>
[
// SwooleTW\Http\Websocket\Middleware\DecryptCookies::class,
// SwooleTW\Http\Websocket\Middleware\StartSession::class,
// SwooleTW\Http\Websocket\Middleware\Authenticate::class,
],
/*
|--------------------------------------------------------------------------
| Websocket handler for customized onHandShake callback
|--------------------------------------------------------------------------
*/
'handshake'
=>
[
'enabled'
=>
false
,
'handler'
=>
SwooleTW\Http\Websocket\HandShakeHandler
::
class
,
],
/*
|--------------------------------------------------------------------------
| Default websocket driver
|--------------------------------------------------------------------------
*/
'default'
=>
'table'
,
/*
|--------------------------------------------------------------------------
| Websocket client's heartbeat interval (ms)
|--------------------------------------------------------------------------
*/
'ping_interval'
=>
25000
,
/*
|--------------------------------------------------------------------------
| Websocket client's heartbeat interval timeout (ms)
|--------------------------------------------------------------------------
*/
'ping_timeout'
=>
60000
,
/*
|--------------------------------------------------------------------------
| Room drivers mapping
|--------------------------------------------------------------------------
*/
'drivers'
=>
[
'table'
=>
SwooleTW\Http\Websocket\Rooms\TableRoom
::
class
,
'redis'
=>
SwooleTW\Http\Websocket\Rooms\RedisRoom
::
class
,
],
/*
|--------------------------------------------------------------------------
| Room drivers settings
|--------------------------------------------------------------------------
*/
'settings'
=>
[
'table'
=>
[
'room_rows'
=>
4096
,
'room_size'
=>
2048
,
'client_rows'
=>
8192
,
'client_size'
=>
2048
,
],
'redis'
=>
[
'server'
=>
[
'host'
=>
env
(
'REDIS_HOST'
,
'127.0.0.1'
),
'password'
=>
env
(
'REDIS_PASSWORD'
,
null
),
'port'
=>
env
(
'REDIS_PORT'
,
6379
),
'database'
=>
0
,
'persistent'
=>
true
,
],
'options'
=>
[
//
],
'prefix'
=>
'swoole:'
,
],
],
];
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, Aug 25, 3:19 PM (1 d, 4 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
223739
Default Alt Text
swoole_websocket.php (3 KB)
Attached To
Mode
R2 kolab
Attached
Detach File
Event Timeline
Log In to Comment