EasyServerConfig class
服务端配置
- Inheritance
-
- Object
- EasyConfig
- EasyServerConfig
Constructors
-
EasyServerConfig({EasyLogHandler? logger, EasyLogLevel? logLevel, String? logTag, String? logFilePath, int? logFileBackup, int? logFileMaxBytes, required String host, required int port, int instances = 1, String? pwd, String secret = 'secret', bool binary = false, int heart = 60 * 1000, int timeout = 60 * 1000 * 3, int reqIdCache = 32, String ipHeader = 'x-forwarded-for', Map<
String, String> ? httpHeaders, String? sslKeyFile, String? sslCerFile, List<String> ? links, EasyUniDbConfig? uniDbConfig})
Properties
- binary → bool
-
为true时使用二进制收发数据,为false时使用字符串收发数据
final
-
clusterConfigs
→ Map<
String, List< EasyServerConfig> > -
需要远程连接的集群分组配置信息
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- heart → int
-
心跳检测周期(毫秒)
final
- host → String
-
监听域名
final
-
httpHeaders
→ Map<
String, String> ? -
final
- httpUrl → String
-
http请求地址
no setter
- instances → int
-
集群启动的实例数量,建议只对web服务设置设置该值>1,因为websocket服务每个session是有状态的
final
- ipHeader → String
-
获取ip地址的请求头
final
-
links
→ List<
String> ? -
需要远程连接的集群分组
final
- logFileBackup → int?
-
日志文件保存数量
finalinherited
- logFileMaxBytes → int?
-
日志文件每份大小(字节)
finalinherited
- logFilePath → String?
-
日志输出文件路径
finalinherited
- logger → EasyLogHandler?
-
日志处理方法
finalinherited
- logLevel → EasyLogLevel?
-
日志级别
finalinherited
- logTag → String?
-
日志标签
finalinherited
- port → int
-
监听端口号
final
- pwd → String?
-
数据加解密密码,为null时不启用数据加解密
final
- reqIdCache → int
-
校验重复包的包id缓存数量
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- secret → String
-
内部通讯数据包签名验签密钥
final
- sslCerFile → String?
-
ssl模式cer文件路径
final
- sslEnable → bool
-
为true时启用ssl证书模式
no setter
- sslKeyFile → String?
-
ssl模式key文件路径
final
- timeout → int
-
两个心跳包之间的最大间隔时间(毫秒)
final
- uniDbConfig → EasyUniDbConfig?
-
数据库配置信息
final
- websocketUrl → String
-
websocket连接地址
no setter
Methods
-
initClusterConfigs(
Map< String, List< clusterServerConfigs) → voidEasyServerConfig> > - 初始化需要远程连接的集群分组配置信息
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited