config.conf 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <tars>
  2. <application>
  3. <client>
  4. #tarsregistry locator
  5. locator = tars.tarsregistry.QueryObj@tcp -h 127.0.0.1 -p 17890
  6. #max invoke timeout
  7. sync-invoke-timeout = 5000
  8. #refresh endpoint interval
  9. refresh-endpoint-interval = 10000
  10. #stat obj
  11. stat = tars.tarsstat.StatObj
  12. #max send queue length limit
  13. sendqueuelimit = 100000
  14. #async queue length limit
  15. asyncqueuecap = 100000
  16. #async callback thread num
  17. asyncthread = 3
  18. #net thread
  19. netthread = 1
  20. #merge net and sync thread
  21. mergenetasync = 0
  22. #module name
  23. modulename = TestApp.UdpServer
  24. </client>
  25. <server>
  26. #not cout
  27. closecout = 0
  28. #app name
  29. app = TestApp
  30. #server name
  31. server = UdpServer
  32. #path
  33. basepath = ./
  34. datapath = ./
  35. #log path
  36. logpath = ./
  37. #merge net and imp thread
  38. mergenetimp = 0
  39. #local ip, for tarsnode
  40. # local = tcp -h 127.0.0.1 -p 15001 -t 10000
  41. #tarsnode
  42. # node = ServerObj@tcp -h 127.0.0.1 -p 2345 -t 10000
  43. #config obj
  44. # config = tars.tarsconfig.ConfigObj
  45. #notify obj
  46. # notify = tars.tarsconfig.NotifyObj
  47. #log obj
  48. # log = tars.tarslog.LogObj
  49. <TestApp.UdpServer.UdpObjAdapter>
  50. #ip:port:timeout
  51. endpoint = udp -h 127.0.0.1 -p 9016 -t 10000 -e 1
  52. #allow ip
  53. allow =
  54. #max connection num
  55. maxconns = 4096
  56. #imp thread num
  57. threads = 5
  58. #servant
  59. servant = TestApp.UdpServer.UdpObj
  60. #queue capacity
  61. queuecap = 1000000
  62. #tars protocol
  63. protocol = tars
  64. </TestApp.UdpServer.UdpObjAdapter>
  65. <Ipv6Adapter>
  66. #ip:port:timeout
  67. endpoint = udp -h ::1 -p 25460 -t 10000
  68. #允许的IP地址
  69. allow =
  70. #最大连接数
  71. maxconns = 4096
  72. #当前线程个数
  73. threads = 5
  74. #处理对象
  75. servant = TestApp.UdpServer.Ipv6Obj
  76. #队列最大包个数
  77. queuecap = 1000000
  78. </Ipv6Adapter>
  79. </server>
  80. </application>
  81. </tars>