Example #1
0
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)
}
Example #2
0
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)
}