Ejemplo n.º 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
}
Ejemplo n.º 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
}
Ejemplo n.º 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
}
Ejemplo n.º 4
0
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
}
Ejemplo n.º 5
0
Archivo: client.go Proyecto: 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
}