vars.go 836 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. package main
  2. import (
  3. pb "git.wanbits.io/joe/franklin/protos"
  4. "git.wanbits.io/joe/nnet"
  5. "time"
  6. )
  7. var (
  8. hubConfC = nnet.HubConfig{
  9. SizeOfSendChan: 1024,
  10. SizeOfRecvChan: 1024,
  11. ReadBufSize: 2048,
  12. WriteBufSize: 2048,
  13. Timeout: 3 * time.Second,
  14. Tick: 10 * time.Second,
  15. ReadTimeout: 12 * time.Second, // should greater than Tick
  16. }
  17. hubConfS = nnet.HubConfig{
  18. SizeOfSendChan: 1024,
  19. SizeOfRecvChan: 1024,
  20. ReadBufSize: 2048,
  21. WriteBufSize: 2048,
  22. Timeout: 3 * time.Second,
  23. Tick: 10 * time.Second,
  24. ReadTimeout: 12 * time.Second, // should greater than Tick
  25. }
  26. g_conf *pb.AppConf
  27. g_server nnet.IHub
  28. g_serverProto *CSProtocol
  29. g_rabbit nnet.IHub
  30. g_rabbitProto *RabbitCProtocol
  31. g_logics nnet.IHub
  32. g_taj nnet.IHub // lobbies
  33. g_offline bool
  34. )