Example #1
0
func HandleParseBw(task *gotcp.Task, data []byte) bool {
	switch byCmd := data[0]; byCmd {
	case Cmd.CMD_NULL:
		switch byParam := data[1]; byParam {
		case Cmd.SERVER_PARA_NULL:
			HandleWriteFunBw(task, data)
			task.HeartBeatReturn = true
		case Cmd.CLIENT_PARA_NULL:
			task.HeartBeatReturn = true
		}
	default:
		return false
	}
	return true
}
Example #2
0
func HandleHeartBeatRequestBw(task *gotcp.Task) {
	cmd := Cmd.NewT_ClientNullCmd()
	task.SendCmd(cmd)
}