sendPacket() a rate limited writer of outbound bytes to the wire wraps a proto.Message into a universal Envelope, then converts to bytes and sends them across the wire without violating the data flow rate limits message may be a Packet, a Ping or a Pong
(packet *Packet, m *limiter.Monitor)
| 384 | // sends them across the wire without violating the data flow rate limits |
| 385 | // message may be a Packet, a Ping or a Pong |
| 386 | func (c *MultiConn) sendPacket(packet *Packet, m *limiter.Monitor) { |
| 387 | if packet != nil { |
| 388 | //c.log.Debugf("Send Packet to %s (ID:%s, L:%d, E:%t), hash: %s", |
| 389 | // lib.BytesToTruncatedString(c.Address.PublicKey), |
| 390 | // lib.Topic_name[int32(packet.StreamId)], |
| 391 | // len(packet.Bytes), |
| 392 | // packet.Eof, |
| 393 | // crypto.ShortHashString(packet.Bytes), |
| 394 | //) |
| 395 | } |
| 396 | // send packet as message over the wire |
| 397 | c.sendWireBytes(packet, m) |
| 398 | } |
| 399 | |
| 400 | // sendWireBytes() a rate limited writer of outbound bytes to the wire |
| 401 | // wraps a proto.Message into a universal Envelope, then converts to bytes and |
nothing calls this directly
no test coverage detected