(conn net.Conn, uuid string)
| 211 | } |
| 212 | |
| 213 | func (agent *Agent) handleDataFromDownstream(conn net.Conn, uuid string) { |
| 214 | rMessage := protocol.PrepareAndDecideWhichRProtoFromLower(conn, global.G_Component.Secret, global.G_Component.UUID) |
| 215 | |
| 216 | for { |
| 217 | header, message, err := protocol.DestructMessage(rMessage) |
| 218 | if err != nil { |
| 219 | downStreamOffline(agent.mgr, agent.options, uuid) |
| 220 | return |
| 221 | } |
| 222 | |
| 223 | sMessage := protocol.PrepareAndDecideWhichSProtoToUpper(global.G_Component.Conn, global.G_Component.Secret, global.G_Component.UUID) |
| 224 | |
| 225 | protocol.ConstructMessage(sMessage, header, message, true) |
| 226 | sMessage.SendMessage() |
| 227 | } |
| 228 | } |
| 229 | |
| 230 | func changeRoute(header *protocol.Header) string { |
| 231 | route := header.Route |
no test coverage detected