示例#1
0
/*
	call by server
	send task to client to retask
*/
func Retask(task string) {
	tempMap := make(map[string]string)
	tempMap["task"] = task
	command := &gocommand.Command{"retask", "retask", tempMap}
	temp := gocommand.EnCode(command.GetCommandString())
	gonet.ServerSend(temp)
}
示例#2
0
/*
	call by server
	to send the res to client
*/
func reduceToClient() {
	tempMap := make(map[string]string)
	tempMap["result"] = ReduceMap
	command := &gocommand.Command{"reduce", "reduce", tempMap}
	temp := gocommand.EnCode(command.GetCommandString())
	gonet.ServerSend(temp)
	ReduceMap = ""
}