示例#1
0
func NewSServerUserGate(vSServerUserMgr *SServerUserMgr) (*SServerUserGate, error) {
	GSLog.Debugln("NewSServerUserGate()")

	this := &SServerUserGate{
		M_SServerUserMgr: vSServerUserMgr,
	}
	this.SConnecterWithMsgHeader, _ = bsn_net.NewSConnecterWithMsgHeader(this)

	return this, nil
}
示例#2
0
func NewSServerGateConfig(vSGate *SGate, strAddr string) (*SServerGateConfig, error) {
	GSLog.Debugln("NewSServerGateConfig()")

	this := &SServerGateConfig{
		M_SGate: vSGate,
	}
	this.SConnecterWithMsgHeader, _ = bsn_net.NewSConnecterWithMsgHeader(this)
	this.SetAddr(strAddr)

	return this, nil
}
示例#3
0
func NewSServerUserGateConfig(vSServerUserMgr *SServerUserMgr) (*SServerUserGateConfig, error) {
	GSLog.Debugln("NewSServerUserGateConfig()")

	this := &SServerUserGateConfig{
		M_SServerUserMgr: vSServerUserMgr,
		M_Close:          false,
	}
	this.SConnecterWithMsgHeader, _ = bsn_net.NewSConnecterWithMsgHeader(this)

	return this, nil
}
示例#4
0
文件: server_user.go 项目: bsn069/go
func NewSServerUser(vSServerUserMgr *SServerUserMgr) (*SServerUser, error) {
	GSLog.Debugln("NewSServerUser()")

	this := &SServerUser{
		M_SServerUserMgr: vSServerUserMgr,
		M_ServerType:     bsn_define.EServerType_ServerType_Counts,
		M_Close:          false,
	}
	this.SConnecterWithMsgHeader, _ = bsn_net.NewSConnecterWithMsgHeader(this)

	return this, nil
}
示例#5
0
文件: client.go 项目: bsn069/go
func NewClient(strAddr string) (*SClient, error) {
	GClientId++
	GSLog.Debugln("NewClient() GClientId=", GClientId)

	this := &SClient{
		M_TClientId: GClientId,
	}
	this.SConnecterWithMsgHeader, _ = bsn_net.NewSConnecterWithMsgHeader(this)
	this.SetAddr(strAddr)

	vSCmdClient := &SCmdClient{M_SClient: this}
	bsn_input.GSInput.Reg("Client"+strconv.Itoa(int(GClientId)), vSCmdClient)

	return this, nil
}