(agent *agent, msg *message.Message)
| 409 | } |
| 410 | |
| 411 | func (h *LocalHandler) processMessage(agent *agent, msg *message.Message) { |
| 412 | var lastMid uint64 |
| 413 | switch msg.Type { |
| 414 | case message.Request: |
| 415 | lastMid = msg.ID |
| 416 | case message.Notify: |
| 417 | lastMid = 0 |
| 418 | default: |
| 419 | log.Println("Invalid message type: " + msg.Type.String()) |
| 420 | return |
| 421 | } |
| 422 | |
| 423 | handler, found := h.localHandlers[msg.Route] |
| 424 | if !found { |
| 425 | h.remoteProcess(agent.session, msg, false) |
| 426 | } else { |
| 427 | h.localProcess(handler, lastMid, agent.session, msg) |
| 428 | } |
| 429 | } |
| 430 | |
| 431 | func (h *LocalHandler) handleWS(conn *websocket.Conn) { |
| 432 | c, err := newWSConn(conn) |
no test coverage detected