appsettings.json 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. {
  2. "Sers": {
  3. /* 通讯层配置 */
  4. "CL": {
  5. /* 共用配置,子项共用,覆写子项未指定的配置 */
  6. "Config": {
  7. /* 请求超时时间(单位ms,默认60000) */
  8. "requestTimeoutMs": 60000,
  9. /* 后台处理消息的线程个数(单位个,默认2) */
  10. "workThreadCount": 8,
  11. //HeartBeat
  12. /* 心跳检测超时时间(单位ms,默认30000) */
  13. "heartBeatTimeoutMs": 30000,
  14. /* 心跳检测失败重试次数(单位次,默认10) */
  15. "heartBeatRetryCount": 10,
  16. /* 心跳检测时间间隔(单位ms,默认10000,若指定为0则不进行心跳检测) */
  17. "heartBeatIntervalMs": 10000,
  18. /* 连接秘钥,用以验证连接安全性。服务端和客户端必须一致 */
  19. "secretKey": "SersCL"
  20. },
  21. /* one conn is one channel.can be multiable */
  22. "Server": [
  23. {
  24. //Ipc.NamedPipe
  25. /* (x.1) type */
  26. /* 在此Assembly中查找Builder */
  27. "assemblyFile": "Sers.CL.Ipc.NamedPipe.dll",
  28. /* the class of Builder in assemblyFile */
  29. "className": "Sers.CL.Ipc.NamedPipe.OrganizeServerBuilder",
  30. /* (x.2) config */
  31. /* 命名管道名称。例如: "Sers.CL.Ipc" */
  32. "pipeName": "Sers.CL.Ipc"
  33. },
  34. {
  35. // Socket.Iocp
  36. /* (x.1) type */
  37. /* 在此Assembly中查找builder */
  38. "assemblyFile": "Sers.CL.Socket.Iocp.dll",
  39. /* the class of Builder in assemblyFile */
  40. //"className": "Sers.CL.Socket.Iocp.OrganizeServerBuilder",
  41. /* (x.2) config */
  42. /* 服务端 监听地址。若不指定则监听所有网卡。例如: "127.0.0.1"、"sersms.com"。*/
  43. //"host": "127.0.0.1",
  44. /* 服务端 监听端口号。例如: 4501 */
  45. "port": 4501
  46. },
  47. {
  48. // Socket.ThreadWait
  49. /* (x.1) type - Socket */
  50. /* 在此Assembly中查找builder */
  51. "assemblyFile": "Sers.CL.Socket.ThreadWait.dll",
  52. /* the class of Builder in assemblyFile */
  53. //"className": "Sers.CL.Socket.ThreadWait.OrganizeServerBuilder",
  54. /* (x.2) config */
  55. /* 服务端 监听地址。若不指定则监听所有网卡。例如: "127.0.0.1"、"sersms.com"。*/
  56. //"host": "127.0.0.1",
  57. /* 服务端 监听端口号。例如: 4501 */
  58. "port": 4501
  59. },
  60. {
  61. // Zmq.ThreadWait
  62. /* (x.1) type */
  63. /* 在此Assembly中查找Builder */
  64. "assemblyFile": "Sers.CL.ClrZmq.ThreadWait.dll",
  65. /* the class of Builder in assemblyFile */
  66. //"className": "Sers.CL.ClrZmq.ThreadWait.OrganizeServerBuilder",
  67. /* (x.2) config */
  68. /* 地址。例如: "tcp://*:4502" 、 "ipc://4502" */
  69. "endpoint": "tcp://*:4502"
  70. },
  71. {
  72. // WebSocket
  73. /* (x.1) type */
  74. /* 在此Assembly中查找builder */
  75. "assemblyFile": "Sers.CL.WebSocket.dll",
  76. /* the class of builder in assemblyFile */
  77. //"className": "Sers.CL.WebSocket.OrganizeServerBuilder",
  78. /* (x.2) config */
  79. /* 服务端地址(默认为 "ws://0.0.0.0:4503") */
  80. "host": "ws://0.0.0.0:4503"
  81. },
  82. {
  83. // Zmq.FullDuplex
  84. /* (x.1) type */
  85. /* 在此Assembly中查找Builder */
  86. "assemblyFile": "Sers.CL.Zmq.FullDuplex.dll",
  87. /* the class of Builder in assemblyFile */
  88. //"className": "Sers.CL.Zmq.FullDuplex.OrganizeServerBuilder",
  89. /* (x.2) config */
  90. /* 地址。例如: "tcp://*:4504" 、 "ipc://4504" */
  91. "endpoint": "tcp://*:4504"
  92. },
  93. {
  94. //Ipc.SharedMemory
  95. /* (x.1) type */
  96. /* 在此Assembly中查找Builder */
  97. "assemblyFile": "Sers.CL.Ipc.SharedMemory.dll",
  98. /* the class of Builder in assemblyFile */
  99. //"className": "Sers.CL.Ipc.SharedMemory.OrganizeServerBuilder",
  100. /* (x.2) config */
  101. /* 共享内存名称。例如: "ipcTest" */
  102. "name": "ipcForStationDemo",
  103. /* 共享内存节点个数。例如: 64 */
  104. "nodeCount": 128,
  105. /* 共享内存节点大小。例如: 2048 */
  106. "nodeBufferSize": 102400
  107. }
  108. ]
  109. }
  110. }
  111. }