func NewSNetServer(vINetServerImp INetServerImp) (*SNetServer, error) { GSLog.Debugln("NewSNetServer") this := &SNetServer{} this.M_INetServerImp = vINetServerImp this.SNetListener, _ = NewSNetListener() this.SState = bsn_common.NewSState() this.SNotifyClose = bsn_common.NewSNotifyClose() return this, nil }
func NewSNetListener() (*SNetListener, error) { GSLog.Debugln("NewSNetListener") this := &SNetListener{ M_chanConn: make(bsn_common.TNetChanConn, 100), } this.SState = bsn_common.NewSState() this.SNotifyClose = bsn_common.NewSNotifyClose() return this, nil }
func NewSClientUser(vSClientUserMgr *SClientUserMgr) (*SClientUser, error) { GSLog.Debugln("NewSClientUser") this := &SClientUser{ M_SClientUserMgr: vSClientUserMgr, } this.SSessionWithMsgHeader, _ = bsn_net.NewSSessionWithMsgHeader() this.SState = bsn_common.NewSState() this.SNotifyClose = bsn_common.NewSNotifyClose() return this, nil }
func NewNetConnecter(vINetConnecterImp INetConnecterImp) (*SNetConnecter, error) { GSLog.Debugln("NewNetConnecter") this := &SNetConnecter{} this.M_INetConnecterImp = vINetConnecterImp this.SSessionAddrConnect, _ = NewSSessionAddrConnect() this.SState = bsn_common.NewSState() this.SNotifyClose = bsn_common.NewSNotifyClose() return this, nil }
func NewSClientUser(vSClientUserMgr *SClientUserMgr) (*SClientUser, error) { GSLog.Debugln("NewSClientUser") this := &SClientUser{ M_SClientUserMgr: vSClientUserMgr, M_TClientId: 0, M_byRecvBuff: make([]byte, 4), M_SMsgHeader: new(bsn_msg.SMsgHeader), } this.SSession, _ = bsn_net.NewSSession() this.SState = bsn_common.NewSState() this.SNotifyClose = bsn_common.NewSNotifyClose() return this, nil }