(msgType string, data string)
| 238 | } |
| 239 | |
| 240 | func (s *Session) sendToAgent(msgType string, data string) error { |
| 241 | msg := map[string]interface{}{ |
| 242 | "type": msgType, |
| 243 | "session_id": s.SessionID, |
| 244 | } |
| 245 | if data != "" { |
| 246 | msg["data"] = data |
| 247 | } |
| 248 | return s.sender.SendJSON(s.ApiID, msg) |
| 249 | } |
| 250 | |
| 251 | // touchActivity updates the last activity timestamp. |
| 252 | func (s *Session) touchActivity() { |
no test coverage detected