main.go 429 B

123456789101112131415161718192021222324252627282930
  1. package main
  2. import (
  3. "git.qianqiusoft.com/library/glog"
  4. )
  5. func main() {
  6. glog.MaxSize = 1024 * 1024 * 32
  7. glog.Infoln("main")
  8. glog.SetLevelString("info")
  9. defer glog.Flush()
  10. conf := &Config{}
  11. conf.Port = "10808"
  12. conf.BufferSize = 1024
  13. conf.Parser = nil
  14. conf.Getter = nil
  15. store := NewMemoryStore()
  16. svr := NewTcpServer(conf, store)
  17. store.Svr = svr
  18. glog.Infoln("启动服务")
  19. svr.StartServer()
  20. select {
  21. }
  22. }