示例#1
0
文件: main.go 项目: no2key/memcachep
func main() {
	port := 11345
	ls, e := net.Listen("tcp", fmt.Sprintf(":%d", port))
	if e != nil {
		log.Fatalf("Got an error:  %s", e)
	}
	memcachep.Listen(ls)
}
示例#2
0
文件: run.go 项目: kissthink/scanfile
func main() {
	files := scanfile.PathFiles(ConfigServerPath)
	mf = scanfile.InitMemFiles(files)

	ls, e := net.Listen("tcp", fmt.Sprintf(":%d", ConfigServerPort))
	if e != nil {
		log.Fatalf("Got an error:  %s", e)
	}

	fmt.Println("server running.")

	memcachep.Listen(ls)
}