Esempio n. 1
0
func main() {

	// 减少内存分配

	parseArg()
	devCount := oneEnvParam.ResourceCount
	stat.GetLocalStatistInst().Init("pu_llog", "logic.dat", int32(devCount))
	go stat.GetLocalStatistInst().Start()
	mylog.GetErrorLogger().Init("pu_elog", "error.log")

	go stat.StartMonitorTask("pu_mlog", "monitor.dat")

	for i := oneEnvParam.BeginID; i <= devCount; i++ {

		sn := new(bytes.Buffer)
		fmt.Fprintf(sn, "%v", strconv.Itoa(int(i)))
		var pu *PUDevice = new(PUDevice)
		pu.run(sn.String())
	}

	for {
		time.Sleep(10 * time.Minute)
	}

}
Esempio n. 2
0
func main() {

	fmt.Println("DataTransfer Running!")

	server.ParseArg()

	right := base.VIDEO_RIGHT | base.AUDIO_RIGHT
	fmt.Println(right)
	var PKS1024 string = "s5DrLk2RE355BcO7FZ49xNdfAQtwKsMaEJa8yOnX7IjkRiOnmOoXCiCsRl0vpe23eZ7SWUW47DvQ1UxEpkGsFv/LOeOxMh06oXeH0zqlRPCw074q0s+IfRtcbdqGLvzvCz8ZAaoQrEIfwq2hm+7ueWKjWecqqQlQ5cu+dg3gd80="
	var E string = "AQAB"
	base.InitRsaBig(PKS1024, E)

	stat.GetLocalStatistInst().Init("dt_llog", "logic.dat", 0)
	mylog.GetErrorLogger().Init("dt_elog", "error.log")
	go stat.StartMonitorTask("dt_mlog", "monitor.dat")
	go stat.GetLocalStatistInst().Start()
	runtime.GOMAXPROCS(runtime.NumCPU())
	server.Run()

	exitChn := make(chan bool, 1)
	exit := <-exitChn
	fmt.Println("DataTransfer Running Over!", exit)
}