예제 #1
0
파일: server.go 프로젝트: bsn069/go
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
}
예제 #2
0
파일: listener.go 프로젝트: bsn069/go
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
}
예제 #3
0
파일: client_user.go 프로젝트: bsn069/go
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
}
예제 #4
0
파일: connecter.go 프로젝트: bsn069/go
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
}
예제 #5
0
파일: client_user.go 프로젝트: bsn069/go
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
}