func NewServerCreate(optionSrc options.OptionLoder) *RlServer { option, err := optionSrc.Load(true) if err != nil { rllogger.Outputf(rllogger.LogTerminate, "Option load failed: %s", err) } server := RlServer{ option: *option, changeCountLock: new(sync.RWMutex), CoroutineActiveResource: *(helpers.NewCoroutineActiveResource())} rllogger.Output(rllogger.LogInfo, server.info()) return &server }
func newConnectionInfo(label string) *connectionInfo { result := connectionInfo{ *(helpers.NewCoroutineActiveResource()), label} return &result }
func NewRlStatistic() *RlStatistic { statistic := RlStatistic{ CoroutineActiveResource: *(helpers.NewCoroutineActiveResource())} return &statistic }
func NewAnswerDispatcher() *AnswerDispatcher { result := AnswerDispatcher{ channels: make(map[string]*chan protocol.ServerCmd), CoroutineActiveResource: *(helpers.NewCoroutineActiveResource())} return &result }