123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139 |
- {
- "Sers": {
- /* 通讯层配置 */
- "CL": {
- /* 共用配置,子项共用,覆写子项未指定的配置 */
- "Config": {
- /* 请求超时时间(单位ms,默认60000) */
- "requestTimeoutMs": 60000,
- /* 后台处理消息的线程个数(单位个,默认2) */
- "workThreadCount": 8,
- //HeartBeat
- /* 心跳检测超时时间(单位ms,默认30000) */
- "heartBeatTimeoutMs": 30000,
- /* 心跳检测失败重试次数(单位次,默认10) */
- "heartBeatRetryCount": 10,
- /* 心跳检测时间间隔(单位ms,默认10000,若指定为0则不进行心跳检测) */
- "heartBeatIntervalMs": 10000,
- /* 连接秘钥,用以验证连接安全性。服务端和客户端必须一致 */
- "secretKey": "SersCL"
- },
- /* one conn is one channel.can be multiable */
- "Server": [
- {
- //Ipc.NamedPipe
- /* (x.1) type */
- /* 在此Assembly中查找Builder */
- "assemblyFile": "Sers.CL.Ipc.NamedPipe.dll",
- /* the class of Builder in assemblyFile */
- "className": "Sers.CL.Ipc.NamedPipe.OrganizeServerBuilder",
- /* (x.2) config */
- /* 命名管道名称。例如: "Sers.CL.Ipc" */
- "pipeName": "Sers.CL.Ipc"
- },
- {
- // Socket.Iocp
- /* (x.1) type */
- /* 在此Assembly中查找builder */
- "assemblyFile": "Sers.CL.Socket.Iocp.dll",
- /* the class of Builder in assemblyFile */
- //"className": "Sers.CL.Socket.Iocp.OrganizeServerBuilder",
- /* (x.2) config */
- /* 服务端 监听地址。若不指定则监听所有网卡。例如: "127.0.0.1"、"sersms.com"。*/
- //"host": "127.0.0.1",
- /* 服务端 监听端口号。例如: 4501 */
- "port": 4501
- },
- {
- // Socket.ThreadWait
- /* (x.1) type - Socket */
- /* 在此Assembly中查找builder */
- "assemblyFile": "Sers.CL.Socket.ThreadWait.dll",
- /* the class of Builder in assemblyFile */
- //"className": "Sers.CL.Socket.ThreadWait.OrganizeServerBuilder",
- /* (x.2) config */
- /* 服务端 监听地址。若不指定则监听所有网卡。例如: "127.0.0.1"、"sersms.com"。*/
- //"host": "127.0.0.1",
- /* 服务端 监听端口号。例如: 4501 */
- "port": 4501
- },
- {
- // Zmq.ThreadWait
- /* (x.1) type */
- /* 在此Assembly中查找Builder */
- "assemblyFile": "Sers.CL.ClrZmq.ThreadWait.dll",
- /* the class of Builder in assemblyFile */
- //"className": "Sers.CL.ClrZmq.ThreadWait.OrganizeServerBuilder",
- /* (x.2) config */
- /* 地址。例如: "tcp://*:4502" 、 "ipc://4502" */
- "endpoint": "tcp://*:4502"
- },
- {
- // WebSocket
- /* (x.1) type */
- /* 在此Assembly中查找builder */
- "assemblyFile": "Sers.CL.WebSocket.dll",
- /* the class of builder in assemblyFile */
- //"className": "Sers.CL.WebSocket.OrganizeServerBuilder",
- /* (x.2) config */
- /* 服务端地址(默认为 "ws://0.0.0.0:4503") */
- "host": "ws://0.0.0.0:4503"
- },
- {
- // Zmq.FullDuplex
- /* (x.1) type */
- /* 在此Assembly中查找Builder */
- "assemblyFile": "Sers.CL.Zmq.FullDuplex.dll",
- /* the class of Builder in assemblyFile */
- //"className": "Sers.CL.Zmq.FullDuplex.OrganizeServerBuilder",
- /* (x.2) config */
- /* 地址。例如: "tcp://*:4504" 、 "ipc://4504" */
- "endpoint": "tcp://*:4504"
- },
- {
- //Ipc.SharedMemory
- /* (x.1) type */
- /* 在此Assembly中查找Builder */
- "assemblyFile": "Sers.CL.Ipc.SharedMemory.dll",
- /* the class of Builder in assemblyFile */
- //"className": "Sers.CL.Ipc.SharedMemory.OrganizeServerBuilder",
- /* (x.2) config */
- /* 共享内存名称。例如: "ipcTest" */
- "name": "ipcForStationDemo",
- /* 共享内存节点个数。例如: 64 */
- "nodeCount": 128,
- /* 共享内存节点大小。例如: 2048 */
- "nodeBufferSize": 102400
- }
- ]
- }
- }
- }
|