34 lines
569 B
PHP
34 lines
569 B
PHP
<?php
|
|
|
|
namespace Coroutine\Server;
|
|
|
|
class Config
|
|
{
|
|
public string $host = '0.0.0.0';
|
|
|
|
public int $port = 9501;
|
|
|
|
public string $authKey = 'access_token';
|
|
|
|
public int $writeTimeout = 0;
|
|
|
|
public int $maxCoroutine = 100000;
|
|
|
|
public int $readTimeout = 0;
|
|
|
|
public int $maxPackageSize = 2097152;
|
|
|
|
public int $maxFrameSize = 2097152;
|
|
|
|
public bool $exposeOnlineLists = false;
|
|
|
|
public string $websocketPath = '/websocket';
|
|
|
|
public string $onlineListPath = '/online/lists';
|
|
|
|
public function normalizePath(string $path): string
|
|
{
|
|
return '/' . ltrim($path, '/');
|
|
}
|
|
}
|