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