-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathkbengine_defs.xml
More file actions
821 lines (716 loc) · 29.4 KB
/
kbengine_defs.xml
File metadata and controls
821 lines (716 loc) · 29.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
<root>
<!-- 游戏逻辑处理频率HZ
(Update frequency process, HZ)
-->
<gameUpdateHertz> 10 </gameUpdateHertz>
<!-- 每秒发送到客户端的带宽限制(bit)
(The data sent to the client, the second bandwidth limit (bit))
-->
<bitsPerSecondToClient> 20000 </bitsPerSecondToClient> <!-- Type: Integer -->
<!-- 非0则不优化, 不带包长信息的包强制都携带长度信息, 某些情况下方便某些前端对接协议
什么样的包不带长度信息? 所有能够预先计算出包大小的且永远不变的包不带长度信息,
如果有可变字符串参数则一定需要带长度信息
(Non-0 is not optimized, Force all packets contain length information, Some convenient docking protocol client.
What of data packet length information does not? All packages can be calculated in advance
and never change the size of the package with no length information.)
-->
<packetAlwaysContainLength> 0 </packetAlwaysContainLength>
<!-- 是否需要将任何接收和发送的包以文本输出到log中提供调试
(Whether the contents of the log output packet)
debug_type:
0: 不输出(Not output)
1: 16进制输出(16 hexadecimal output)
2: 字符流输出(Stringstream output)
3: 10进制输出(10 hexadecimal output)
use_logfile:
是否独立一个log文件来记录包内容,文件名通常为
(Whether the use of other log files ? such as:)
appname_packetlogs.log
disable_msgs:
关闭某些包的输出
(Some messages are not output)
-->
<trace_packet>
<debug_type> 0 </debug_type>
<use_logfile> false </use_logfile>
<disables>
<item>Encrypted::packets</item>
<item>Baseappmgr::updateBaseapp</item>
<item>Baseappmgr::onBaseappInitProgress</item>
<item>Cellappmgr::updateCellapp</item>
<item>Cellappmgr::onCellappInitProgress</item>
<item>Loginapp::onBaseappInitProgress</item>
<item>Cellapp::onUpdateDataFromClient</item>
<item>Baseapp::onUpdateDataFromClient</item>
<item>Baseapp::forwardMessageToClientFromCellapp</item>
<item>Client::onUpdateVolatileData</item>
<item>Client::onUpdateData</item>
<item>Client::onUpdateBasePos</item>
<item>Client::onUpdateData_xz</item>
<item>Client::onUpdateData_xyz</item>
<item>Client::onUpdateData_y</item>
<item>Client::onUpdateData_r</item>
<item>Client::onUpdateData_p</item>
<item>Client::onUpdateData_ypr</item>
<item>Client::onUpdateData_yp</item>
<item>Client::onUpdateData_yr</item>
<item>Client::onUpdateData_pr</item>
<item>Client::onUpdateData_xz_y</item>
<item>Client::onUpdateData_xz_p</item>
<item>Client::onUpdateData_xz_r</item>
<item>Client::onUpdateData_xz_yr</item>
<item>Client::onUpdateData_xz_yp</item>
<item>Client::onUpdateData_xz_pr</item>
<item>Client::onUpdateData_xz_ypr</item>
<item>Client::onUpdateData_xyz_y</item>
<item>Client::onUpdateData_xyz_p</item>
<item>Client::onUpdateData_xyz_r</item>
<item>Client::onUpdateData_xyz_yr</item>
<item>Client::onUpdateData_xyz_yp</item>
<item>Client::onUpdateData_xyz_pr</item>
<item>Client::onUpdateData_xyz_ypr</item>
</disables>
</trace_packet>
<!-- 是否输出entity的创建, 脚本获取属性, 初始化属性等调试信息, 以及def信息
(Whether the output the logs: create the entity, Script get attributes,
Initialization attributes information, Def information.)
-->
<debugEntity> 0 </debugEntity>
<publish>
<!-- 发布状态, 可在脚本中获取该值。 KBEngine.publish()
(apps released state, This value can be obtained in the script. KBEngine.publish())
Type: Integer8
0 : debug
1 : release
其他自定义(Other custom)
-->
<state> 0 </state>
<!-- 脚本层发布的版本号
(Script layer released version number)
-->
<script_version> 0.1.0 </script_version>
</publish>
<channelCommon>
<!-- 最后一次通信时间超过此时间则被认定为超时通道, 服务器将踢出该通道
(If long (configurable value) no communication, channel will be kicked out of the server.)
-->
<timeout>
<internal> 60.0 </internal>
<external> 60.0 </external>
</timeout>
<!-- socket读写缓冲大小
(socket send/recv buffer size)
-->
<readBufferSize>
<internal> 16777216 </internal> <!-- 16M -->
<external> 0 </external> <!-- 系统默认(system default) -->
</readBufferSize>
<writeBufferSize>
<internal> 16777216 </internal> <!-- 16M -->
<external> 0 </external> <!-- 系统默认(system default) -->
</writeBufferSize>
<!-- 一个tick内发送与接收窗口溢出值,0无限制
(A tick, the value of the send/receive window overflow, 0 is unlimited)
-->
<windowOverflow>
<send>
<messages>
<critical> 1024 </critical>
<internal> 65535 </internal>
<external> 512 </external>
</messages>
<bytes>
<internal> 0 </internal>
<external> 0 </external>
</bytes>
</send>
<receive>
<messages>
<critical> 24 </critical>
<internal> 65535 </internal>
<external> 32 </external>
</messages>
<bytes>
<internal> 0 </internal>
<external> 2048 </external>
</bytes>
</receive>
</windowOverflow>
<!-- 加密通信,只对外部通道
(Encrypted communication, channel-external only)
可选择的加密方式(Optional encryption):
0: 无加密(No Encryption)
1: Blowfish
2: RSA (res\key\kbengine_private.key)
-->
<encrypt_type> 1 </encrypt_type>
</channelCommon>
<!-- 关服倒计时(秒)
(Countdown to shutdown the server(seconds))
-->
<shutdown_time> 10.0 </shutdown_time>
<!-- 关闭服务器的时候, 如果有未完成的任务, 服务器需要等待任务结束。
每Tick(秒)检查一次
(Shutdown the server, if you have not completed the task, the server needs to wait for the end of the mission.
Time(seconds) for each waiting.)
-->
<shutdown_waittick> 1.0 </shutdown_waittick>
<!-- callback默认超时时间(秒)
(The callback: default timeout(seconds))
-->
<callback_timeout> 300.0 </callback_timeout>
<thread_pool>
<!-- 默认超时时间(秒)
(default timeout(seconds))
-->
<timeout> 300.0 </timeout>
<init_create> 1 </init_create>
<pre_create> 2 </pre_create>
<max_create> 8 </max_create>
</thread_pool>
<!-- Email服务, 提供账号验证, 密码找回等等。
(Email services, providing the account verification, password recovery, etc.)
-->
<email_service_config>server/email_service.xml</email_service_config>
<interfaces>
<!-- 脚本入口模块, 相当于main函数
(Entry module, like the main-function)
-->
<entryScriptFile> kbengine </entryScriptFile>
<!-- interfaces的地址,多组游戏服务端可以共用一个interfaces
(interfaces address, multiple gameserver can share a interfaces)
-->
<host> localhost </host>
<port> 30099 </port>
<!-- 订单超时(秒)
(Orders timeout(seconds))
-->
<orders_timeout> 3600 </orders_timeout>
<!-- listen监听队列最大值
(listen: Maximum listen queue)
-->
<SOMAXCONN> 128 </SOMAXCONN>
<!-- Telnet服务, 如果端口被占用则向后尝试33001..
(Telnet service, if the port is occupied backwards to try 33001)
-->
<telnet_service>
<port> 33000 </port>
<password> kbe </password>
<!-- 命令默认层
(layer of default the command)
-->
<default_layer> python </default_layer>
</telnet_service>
</interfaces>
<dbmgr>
<!-- 脚本入口模块, 相当于main函数
(Entry module, like the main-function)
-->
<entryScriptFile> kbengine </entryScriptFile>
<!-- debug模式下可输出读写操作信息
(Debug mode can output the read and write informations)
-->
<debug> false </debug>
<!-- 是否检查defs-MD5
(Check whether the defs-MD5)
-->
<allowEmptyDigest> false </allowEmptyDigest> <!-- Type: Boolean -->
<!-- 指定接口地址,可配置网卡名、MAC、IP
(Interface address specified, configurable NIC/MAC/IP)
-->
<internalInterface> </internalInterface>
<!-- Interfaces进程的地址(参考interfaces中地址配置)
(Address of Interfaces process)
-->
<InterfacesServiceAddr>
<!-- 如果enable为false则相关数据不转发到Interfaces进程
注意:如果为true,dbmgr认为数据将由interfaces交给第三方平台处理
-->
<enable> true </enable>
<host> localhost </host>
<port> 30099 </port>
</InterfacesServiceAddr>
<!-- 数据库接口
(database interfaces)
-->
<databaseInterfaces>
<!-- 数据库接口名称 (可以定义多个不同的接口,但至少存在一个default)
(Database interface name)
-->
<default>
<!-- 如果为true,则为纯净的数据库,引擎不创建实体表
(If true is pure database, engine does not create the entity table)
-->
<pure> false </pure>
<!-- 数据库类型 (mysql、redis)
(Database type(mysql, redis))
-->
<type> mysql </type> <!-- Type: String -->
<!-- 数据库地址
(Database address)
-->
<host> 172.16.18.64 </host> <!-- Type: String -->
<port> 3306 </port> <!-- Type: Integer -->
<!-- 数据库账号验证
(Database auth)
-->
<auth>
<username> kbe </username> <!-- Type: String -->
<password> kbe </password> <!-- Type: String -->
<!-- 为true则表示password是加密(rsa)的, 可防止明文配置
(is true, password is RSA)
-->
<encrypt> true </encrypt>
</auth>
<!-- 数据库名称
(Database name)
-->
<databaseName> kbe </databaseName> <!-- Type: String -->
<!-- 数据库允许的连接数
(Number of connections allowed by the database)
-->
<numConnections> 5 </numConnections> <!-- Type: Integer -->
<!-- 字符编码类型
(Character encoding type)
-->
<unicodeString>
<characterSet> utf8 </characterSet> <!-- Type: String -->
<collation> utf8_bin </collation> <!-- Type: String -->
</unicodeString>
</default>
</databaseInterfaces>
<!-- 账号系统
(Account system)
-->
<account_system>
<!-- 账号Entity的名称
(Name of AccountEntity)
-->
<accountEntityScriptType> Account </accountEntityScriptType>
<!-- 新账号默认标记(可组合,填写时按十进制格式)
(Default flags a new account, Can be combined, Fill in decimal format when)
常规标记(normal flag) = 0x00000000
锁定标记(lock flag) = 0x000000001
未激活标记(normal flag) = 0x000000002
-->
<accountDefaultFlags> 0 </accountDefaultFlags> <!-- Type: Integer -->
<!-- 新账号默认过期时间(秒, 引擎会加上当前时间)
(New account default expiration time (seconds, the engine will add the current time))
-->
<accountDefaultDeadline> 0 </accountDefaultDeadline> <!-- Type: Integer -->
<!-- 账号注册相关
(Account registration)
-->
<account_registration>
<!-- 是否开放注册
(Whether open registration)
-->
<enable> true </enable>
<!-- 登录合法时游戏数据库找不到游戏账号则自动创建
(When logged in, the game database can not find the game account is automatically created)
-->
<loginAutoCreate> true </loginAutoCreate>
</account_registration>
</account_system>
<!-- Telnet服务, 如果端口被占用则向后尝试32001..
(Telnet service, if the port is occupied backwards to try 32001)
-->
<telnet_service>
<port> 32000 </port>
<password> kbe </password>
<!-- 命令默认层
(layer of default the command)
-->
<default_layer> python </default_layer>
</telnet_service>
</dbmgr>
<cellapp>
<!-- 脚本入口模块, 相当于main函数
(Entry module, like the main-function)
-->
<entryScriptFile> kbengine </entryScriptFile>
<!-- 默认AOI半径, 脚本中可以改变它
(Default AOI radius, the script can change it)
-->
<defaultAoIRadius>
<radius> 80.0 </radius>
<hysteresisArea> 5.0 </hysteresisArea>
</defaultAoIRadius>
<!-- 优化EntityID,AOI范围内实体数小于255个, EntityID传输到client时使用1字节别名ID
(Optimization EntityID,AOI the Entity is less than 255,
use an aliasID(1byte) transmitted to the client)
-->
<aliasEntityID> true </aliasEntityID>
<!-- 优化Entity属性和方法在广播时所消耗的带宽,Entity客户端属性或者客户端方法不超过255时,
方法uid和属性uid传输到client时使用1字节别名ID
(Entity client (property or a method) is less than 256, using 1 byte transmission.)
-->
<entitydefAliasID>true</entitydefAliasID>
<!-- 指定接口地址,可配置网卡名、MAC、IP
(Interface address specified, configurable NIC/MAC/IP)
-->
<internalInterface> </internalInterface>
<!-- entityID分配器,进入溢出范围则请求获取新的ID资源
(The entityID allocator, enter the overflow area will get the new ID's)
-->
<ids>
<criticallyLowSize> 500 </criticallyLowSize> <!-- Type: Integer -->
</ids>
<!-- 程序的性能分析
(Analysis of program performance)
-->
<profiles>
<!-- 如果设置为true,引擎启动时就会开始记录相关profile信息, 进程退出后将导出一份报告
(if is true, Engine start is completed, start to record profile information,
Process exit will export a report.)
-->
<cprofile> false </cprofile>
<pyprofile> false </pyprofile>
<eventprofile> false </eventprofile>
<networkprofile> false </networkprofile>
</profiles>
<!-- 负载平衡滤波器指标值
(Load balancing Smoothing Bias value)
-->
<loadSmoothingBias> 0.01 </loadSmoothingBias>
<ghostDistance> 500.0 </ghostDistance>
<ghostingMaxPerCheck> 64 </ghostingMaxPerCheck> <!-- Type: Integer -->
<!-- ghost更新频率
(Update frequency process)
-->
<ghostUpdateHertz> 30 </ghostUpdateHertz> <!-- Type: Integer -->
<!-- 是否使用坐标系统, 如果设置为false, 那么AOI、Trap、 Move等功能将不可用
(Whether the use of coordinate-system, if is false,
AOI, Trap, Move and other functions will not be available)
-->
<coordinate_system>
<enable> true </enable>
<!-- 是否管理y轴? 注:管理y轴,则AOI、Trap等功能有了高度,当space内的实体较少时比较好用,
否则y轴的管理会带来一些消耗
(is maintenance Y axis? Note: Management y axis, AOI、Trap and other functions with the height,
When the entity space within little more useful when, Otherwise,
the management of the y-axis will produce some consumption
-->
<rangemgr_y> false </rangemgr_y>
<!-- 实体位置停止发生改变后,引擎继续向客户端更新tick次的位置信息,为0则总是更新。
(After stopping to change the position/direction,
the engine continued to update client information(position/direction) ticks
If 0, then always update)
-->
<entity_posdir_additional_updates> 5 </entity_posdir_additional_updates>
</coordinate_system>
<!-- Telnet服务, 如果端口被占用则向后尝试50001..
(Telnet service, if the port is occupied backwards to try 50001)
-->
<telnet_service>
<port> 50000 </port>
<password> kbe </password>
<!-- 命令默认层
(layer of default the command)
-->
<default_layer> python </default_layer>
</telnet_service>
<!-- 服务端关闭过程的参数
(Parameter server shutdown process)
-->
<shutdown>
<!-- 每秒销毁有base部分的entity的数量
(In per-seconds, The destruction of the number of entity's(has base))
-->
<perSecsDestroyEntitySize> 15 </perSecsDestroyEntitySize>
</shutdown>
<!-- 谁是观察者? 玩家就是观察者,观察到的信息会同步给客户端。
开发者可以设计为NPC/Monster在被观察时才激活AI,这样可以减少服务端的CPU消耗。参考Entity.onWitnessed
(Who is witness? Player is witness, The observed information will be synchronized to the client.
Developers can be designed to: Activation (NPC / Monster) AI was observed when, This can reduce server CPU consumption.
see also: Entity.onWitnessed.
)
-->
<witness>
<!-- 当一个实体不再被观察者观察之后,实体并不会马上恢复为未被观察状态,在timeout(秒)时间范围内没有再次被观察则重置状态
(When the observer to stop observing entity, Entity does not recovery immediately to the initial-state,
Not observed before timeout again, the recovery state.)
-->
<timeout> 15 </timeout> <!-- Type: Integer -->
</witness>
</cellapp>
<baseapp>
<!-- 脚本入口模块, 相当于main函数
(Entry module, like the main-function)
-->
<entryScriptFile> kbengine </entryScriptFile>
<!-- 指定接口地址,可配置网卡名、MAC、IP
(Interface address specified, configurable NIC/MAC/IP)
-->
<internalInterface> </internalInterface>
<externalInterface> </externalInterface> <!-- Type: String -->
<!-- 强制指定外部IP地址或者域名,在某些网络环境下,可能会使用端口映射的方式来访问局域网内部的KBE服务器,那么KBE在当前
的机器上获得的外部地址是局域网地址,此时某些功能将会不正常。例如:账号激活邮件中给出的回调地址, 登录baseapp。
注意:服务端并不会检查这个地址的可用性,因为无法检查。
(Forced to specify an external IP-address or Domain-name, In some server environment, May use the port mapping to access KBE,
So KBE on current machines on the external IP address may be a LAN IP address, Then some functions will not normal.
For example: account activation email address given callback.
Note: the availability of server does not check the address, because cannot check)
-->
<externalAddress> </externalAddress> <!-- Type: String -->
<!-- 暴露给客户端的端口范围
(Exposed to the client port range)
-->
<externalPorts_min> 20015 </externalPorts_min> <!-- Type: Integer -->
<externalPorts_max> 20019 </externalPorts_max> <!-- Type: Integer -->
<!-- 自动存档的时间周期(秒)
(Automatic archiving time period(secs))
-->
<archivePeriod> 300 </archivePeriod> <!-- Type: Float -->
<!-- 自动备份的时间(秒)
(Automatic backup time period(secs))
-->
<backupPeriod> 300 </backupPeriod> <!-- Type: Float -->
<!-- 是否备份未定义的属性
(Whether backup undefined property)
-->
<backUpUndefinedProperties> 0 </backUpUndefinedProperties> <!-- Type: Boolean -->
<!-- 负载平衡滤波器指标值
(Load balancing Smoothing Bias value)
-->
<loadSmoothingBias> 0.01 </loadSmoothingBias>
<!-- 资源下载带宽限制
(Download bandwidth limits)
-->
<downloadStreaming>
<bitsPerSecondTotal> 1000000 </bitsPerSecondTotal> <!-- Type: Int -->
<bitsPerSecondPerClient> 100000 </bitsPerSecondPerClient> <!-- Type: Int -->
</downloadStreaming>
<!-- entityID分配器,进入溢出范围则请求获取新的ID资源
(The entityID allocator, enter the overflow area will get the new ID's)
-->
<ids>
<criticallyLowSize> 500 </criticallyLowSize> <!-- Type: Integer -->
</ids>
<!-- 当灾难发生后,baseapp进行灾难恢复时,每次恢复entity的数量
(When after the disaster, When baseapp recovery, Each time the number of recovery entity's)
-->
<entityRestoreSize> 32 </entityRestoreSize>
<!-- 程序的性能分析
(Analysis of program performance)
-->
<profiles>
<!-- 如果设置为true,引擎启动时就会开始记录相关profile信息, 进程退出后将导出一份报告
(if is true, Engine start is completed, start to record profile information,
Process exit will export a report.)
-->
<cprofile> false </cprofile>
<pyprofile> false </pyprofile>
<eventprofile> false </eventprofile>
<networkprofile> false </networkprofile>
</profiles>
<!-- listen监听队列最大值
(listen: Maximum listen queue)
-->
<SOMAXCONN> 128 </SOMAXCONN>
<!-- Telnet服务, 如果端口被占用则向后尝试40001..
(Telnet service, if the port is occupied backwards to try 40001)
-->
<telnet_service>
<port> 40000 </port>
<password> kbe </password>
<!-- 命令默认层
(layer of default the command)
-->
<default_layer> python </default_layer>
</telnet_service>
<!-- 服务端关闭过程的参数
(Parameter server shutdown process)
-->
<shutdown>
<!-- 每秒销毁base的数量
(The destroy of the per-seconds base's)
-->
<perSecsDestroyEntitySize> 15 </perSecsDestroyEntitySize>
</shutdown>
<respool>
<!-- 缓冲区大小也等于资源大小, 在这个KB大小范围以内的资源才可以进入资源池
(Buffer size is equal to the size of resources,
Less than the buffer resources before they can enter the resource pool)
-->
<buffer_size> 1024 </buffer_size>
<!-- 资源池中的资源超过这个时间未被访问则销毁(秒)
(Resources have not been accessed overtime will be destroyed (s))
-->
<timeout> 600 </timeout>
<!-- 资源池检查tick(秒)
(Resource pool check tick (secs))
-->
<checktick>60</checktick>
</respool>
</baseapp>
<cellappmgr>
<!-- 指定接口地址,可配置网卡名、MAC、IP
(Interface address specified, configurable NIC/MAC/IP)
-->
<internalInterface> </internalInterface>
</cellappmgr>
<baseappmgr>
<!-- 指定接口地址,可配置网卡名、MAC、IP
(Interface address specified, configurable NIC/MAC/IP)
-->
<internalInterface> </internalInterface>
</baseappmgr>
<loginapp>
<!-- 脚本入口模块, 相当于main函数
(Entry module, like the main-function)
-->
<entryScriptFile> kbengine </entryScriptFile>
<!-- 指定接口地址,可配置网卡名、MAC、IP
(Interface address specified, configurable NIC/MAC/IP)
-->
<internalInterface> </internalInterface>
<externalInterface> </externalInterface> <!-- Type: String -->
<!-- 强制指定外部IP地址或者域名,在某些网络环境下,可能会使用端口映射的方式来访问局域网内部的KBE服务器,那么KBE在当前
的机器上获得的外部地址是局域网地址,此时某些功能将会不正常。例如:账号激活邮件中给出的回调地址, 登录baseapp。
注意:服务端并不会检查这个地址的可用性,因为无法检查。
(Forced to specify an external IP-address or Domain-name, In some server environment, May use the port mapping to access KBE,
So KBE on current machines on the external IP address may be a LAN IP address, Then some functions will not normal.
For example: account activation email address given callback.
Note: the availability of server does not check the address, because cannot check)
-->
<externalAddress> </externalAddress> <!-- Type: String -->
<!-- 暴露给客户端的端口范围
(Exposed to the client port range)
-->
<externalPorts_min> 20013 </externalPorts_min> <!-- Type: Integer -->
<externalPorts_max> 0 </externalPorts_max> <!-- Type: Integer -->
<!-- 加密登录信息
(The encrypted user login information)
可选择的加密方式(Optional encryption):
0: 无加密(No Encryption)
1: Blowfish
2: RSA (res\key\kbengine_private.key)
-->
<encrypt_login> 2 </encrypt_login>
<!-- listen监听队列最大值
(listen: Maximum listen queue)
-->
<SOMAXCONN> 128 </SOMAXCONN>
<!-- 账号的类型 (Account types)
1: 普通账号 (Normal Account)
2: email账号(需要激活) (Email Account, Note: activation required.)
3: 智能账号(自动识别Email, 普通号码等) (Smart Account (Email or Normal, etc.))
-->
<account_type> 3 </account_type>
<!-- http回调接口,处理认证、密码重置等
(Http-callback interface, handling authentication, password reset, etc.)
-->
<http_cbhost> localhost </http_cbhost>
<http_cbport> 21103 </http_cbport>
<!-- Telnet服务, 如果端口被占用则向后尝试31001..
(Telnet service, if the port is occupied backwards to try 31001)
-->
<telnet_service>
<port> 31000 </port>
<password> kbe </password>
<!-- 命令默认层
(layer of default the command)
-->
<default_layer> python </default_layer>
</telnet_service>
</loginapp>
<machine>
<!-- 暴露给客户端的端口范围
(Exposed to the tools port range)
-->
<externalPorts_min> 20099 </externalPorts_min> <!-- Type: Integer -->
<externalPorts_max> 0 </externalPorts_max> <!-- Type: Integer -->
<!-- 服务组使用多台硬件组成网络,在某些网络环境由于路由器的设置不允许UDP广播造成跨物理机组网不成功时
可在此填入所有相关物理机的地址,引擎将会向具体的地址发送探测包来完成组网,
注意:如果指定了地址池引擎将不再发送全网广播包。
(When the network is composed of a plurality of hardware, the specific network address is detected.)
-->
<addresses>
<!--<item> 127.0.0.1 </item>-->
<!--<item> 192.168.10.18 </item>-->
</addresses>
</machine>
<bots>
<!-- 脚本入口模块, 相当于main函数
(Entry module, like the main-function)
-->
<entryScriptFile> kbengine </entryScriptFile>
<!-- 指定接口地址,可配置网卡名、MAC、IP
(Interface address specified, configurable NIC/MAC/IP)
-->
<internalInterface> </internalInterface>
<!-- loginapp地址
(loginapp address)
-->
<host> localhost </host> <!-- Type: String -->
<port> 20013 </port> <!-- Type: Integer -->
<!-- 在Entity初始化时是否触发属性的set_*事件 -->
<isOnInitCallPropertysSetMethods> true </isOnInitCallPropertysSetMethods>
<!-- 默认启动进程后自动添加这么多个机器人
(After starting the process, automatically add some robots)
totalCount : 添加总数量 (Add the total-number)
tickTime : 每次添加所用时间(s) (Interval time-secs)
tickCount : 每次添加数量 (Each time you add the number of)
-->
<defaultAddBots>
<totalCount> 10 </totalCount> <!-- Type: Integer -->
<tickTime> 0.1 </tickTime> <!-- Type: Float -->
<tickCount> 5 </tickCount> <!-- Type: Integer -->
</defaultAddBots>
<!-- 机器人账号相关
(about bots-accounts)
-->
<account_infos>
<!-- 机器人账号名称的前缀
(The account name prefix)
-->
<account_name_prefix> bot_ </account_name_prefix>
<!-- 机器人账号名称的后缀递增, 0使用随机数递增, 否则按照填写的数递增
注意:想让机器人每次登陆使用相同的账号请设置固定的bots程序启动时的cid参数,具体参考服务器启动脚本,机器人账号由"前缀+cid+后缀组成"。
(The account name suffix, 0 is the use of random number, Otherwise, use account_name_suffix_inc and increasing.)
-->
<account_name_suffix_inc> 0 </account_name_suffix_inc><!-- Type: Integer -->
</account_infos>
<!-- Telnet服务, 如果端口被占用则向后尝试51001..
(Telnet service, if the port is occupied backwards to try 51001)
-->
<telnet_service>
<port> 51000 </port>
<password> kbe </password>
<!-- 命令默认层
(layer of default the command)
-->
<default_layer> python </default_layer>
</telnet_service>
</bots>
<logger>
<!-- 脚本入口模块, 相当于main函数
(Entry module, like the main-function)
-->
<entryScriptFile> kbengine </entryScriptFile>
<!-- 指定接口地址,可配置网卡名、MAC、IP
(Interface address specified, configurable NIC/MAC/IP)
-->
<internalInterface> </internalInterface>
<!-- 单个app(baseapp, cellapp, 等等..)进程上, 一个tick最多缓存的log数量
(The number of single-process(baseapp, cellapp, etc..), The number of log a tick buffer.)
-->
<tick_max_buffered_logs> 131070 </tick_max_buffered_logs>
<!-- 单个app(baseapp, cellapp, 等等..)进程上, 一个tick同步给logger的log数量
(The number of single-process(baseapp, cellapp, etc..), A tick synchronization to the number of logger)
-->
<tick_sync_logs> 0 </tick_sync_logs>
<!-- Telnet服务, 如果端口被占用则向后尝试34001..
(Telnet service, if the port is occupied backwards to try 34001)
-->
<telnet_service>
<port> 34000 </port>
<password> kbe </password>
<!-- 命令默认层
(layer of default the command)
-->
<default_layer> python </default_layer>
</telnet_service>
</logger>
</root>