appsettings.json 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. {
  2. "Sers": {
  3. /* 通讯层配置 */
  4. "CL": {
  5. /* 共用配置,子项共用,覆写子项未指定的配置 */
  6. "Config": {
  7. /* 后台处理消息的线程个数(单位个,默认2) */
  8. "workThreadCount": 2,
  9. /* 请求超时时间(单位ms,默认60000) */
  10. "requestTimeoutMs": 60000,
  11. /* 连接秘钥,用以验证连接安全性。服务端和客户端必须一致 */
  12. "secretKey": "SersCL"
  13. },
  14. /* one conn is one channel.can be multiable */
  15. "Client": [
  16. {
  17. // Socket.Iocp
  18. /* (x.1) type - Iocp */
  19. /* 在此Assembly中查找builder */
  20. //"assemblyFile": "Sers.CL.Socket.Iocp.dll",
  21. /* the class of builder in assemblyFile */
  22. "className": "Sers.CL.Socket.Iocp.OrganizeClientBuilder",
  23. /* (x.2) conn config */
  24. /* 服务端 host地址。例如: "127.0.0.1"、"sersms.com" */
  25. "host": "127.0.0.1",
  26. /* 服务端 监听端口号。例如: 4501 */
  27. "port": 4501
  28. },
  29. {
  30. // Socket.ThreadWait
  31. /* (x.1) type - ThreadWait */
  32. /* the class of builder in assemblyFile */
  33. //"className": "Sers.CL.Socket.ThreadWait.OrganizeClientBuilder",
  34. /* (x.2) config */
  35. /* 服务端 host地址。例如: "127.0.0.1"、"sersms.com" */
  36. "host": "127.0.0.1",
  37. /* 服务端 监听端口号。例如: 4501 */
  38. "port": 4501
  39. },
  40. {
  41. // Zmq.ThreadWait
  42. /* (x.1) type */
  43. /* 在此Assembly中查找Builder */
  44. "assemblyFile": "Sers.CL.ClrZmq.ThreadWait.dll",
  45. /* the class of Builder in assemblyFile */
  46. //"className": "Sers.CL.ClrZmq.ThreadWait.OrganizeClientBuilder",
  47. /* (x.2) config */
  48. /* 地址。例如: "tcp://127.0.0.1:4502" 、 "ipc://4502" */
  49. "endpoint": "tcp://127.0.0.1:4502"
  50. },
  51. {
  52. // WebSocket
  53. /* (x.1) type - WebSocket */
  54. /* 在此Assembly中查找builder */
  55. "assemblyFile": "Sers.CL.WebSocket.dll",
  56. /* the class of builder in assemblyFile */
  57. //"className": "Sers.CL.WebSocket.OrganizeClientBuilder",
  58. /* (x.2) conn config */
  59. /* 服务端地址(默认为 "ws://127.0.0.1:4503") */
  60. "host": "ws://127.0.0.1:4503"
  61. },
  62. {
  63. // Zmq.FullDuplex
  64. /* (x.1) type */
  65. /* 在此Assembly中查找Builder */
  66. "assemblyFile": "Sers.CL.Zmq.FullDuplex.dll",
  67. /* the class of Builder in assemblyFile */
  68. //"className": "Sers.CL.Zmq.FullDuplex.OrganizeClientBuilder",
  69. /* (x.2) config */
  70. /* 地址。例如: "tcp://127.0.0.1:4504" 、 "ipc://4504" */
  71. "endpoint": "tcp://127.0.0.1:4504"
  72. },
  73. {
  74. // Ipc.SharedMemory
  75. /* (x.1) type - Ipc.SharedMemory */
  76. /* 在此Assembly中查找Builder */
  77. "assemblyFile": "Sers.CL.Ipc.SharedMemory.dll",
  78. /* the class of Builder in assemblyFile */
  79. //"className": "Sers.CL.Ipc.SharedMemory.OrganizeClientBuilder",
  80. /* (x.2) config */
  81. /* 共享内存名称。例如: "ipcTest" */
  82. "name": "ipcForRobot"
  83. }
  84. ]
  85. },
  86. /* LocalApiService 配置,可不指定 */
  87. "LocalApiService": {
  88. /* 后台服务的线程个数(单位个,默认0,代表不开启服务) */
  89. "workThreadCount": 1,
  90. /* 静态文件映射器。映射站点静态文件,可多个,可不指定 */
  91. "staticFiles": [
  92. {
  93. /* api路由前缀,例如 "/demo/ui/*" */
  94. "route": "/_robot_/*",
  95. /* api描述,静态文件描述 */
  96. "apiName": "robot站点静态文件",
  97. /* 静态文件路径。可为相对路径或绝对路径。若为空或空字符串则为默认路径(wwwroot)。demo:"wwwroot/demo" */
  98. "rootPath": "wwwroot/_robot_",
  99. /* 静态文件类型映射配置的文件路径。可为相对路径或绝对路径。例如"contentTypeMap.json"。若不指定(或指定的文件不存在)则不指定文件类型映射配置 */
  100. "contentTypeMapFile": "contentTypeMap.json",
  101. /* 回应静态文件时额外添加的http回应头。可不指定。 */
  102. "responseHeaders": {
  103. //设置浏览器静态文件缓存3600秒
  104. "Cache-Control": "public,max-age=3600"
  105. }
  106. }
  107. ]
  108. },
  109. /* ServiceStation配置,可不指定 */
  110. "ServiceStation": {
  111. /* serviceStation站点信息 */
  112. "serviceStationInfo": {
  113. "serviceStationName": "Robot"
  114. }
  115. }
  116. },
  117. /* Vit工具配置,可不指定 */
  118. "Vit": {
  119. /* 日志配置,可不指定 */
  120. "Logger": {
  121. /* print the log to console. default:false */
  122. "PrintToConsole": true
  123. }
  124. }
  125. }