// Start creates the tcp listener and starts the connection handler in a goroutine func (s *Server) Start() (err error) { logger.Info("Starting game server...") s.ln, err = net.Listen("tcp", s.laddr) if err != nil { return fmt.Errorf("couldn't start game server: %v", err) } s.nextIndex = id.Generator() s.t.Go(s.run) return nil }
func init() { indexChan = id.Generator() }
func init() { nextId = id.Generator() }