Esempio n. 1
0
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
}
Esempio n. 2
0
func newConnectionInfo(label string) *connectionInfo {
	result := connectionInfo{
		*(helpers.NewCoroutineActiveResource()),
		label}
	return &result
}
Esempio n. 3
0
func NewRlStatistic() *RlStatistic {
	statistic := RlStatistic{
		CoroutineActiveResource: *(helpers.NewCoroutineActiveResource())}
	return &statistic
}
Esempio n. 4
0
func NewAnswerDispatcher() *AnswerDispatcher {
	result := AnswerDispatcher{
		channels:                make(map[string]*chan protocol.ServerCmd),
		CoroutineActiveResource: *(helpers.NewCoroutineActiveResource())}
	return &result
}