MCPcopy
hub / github.com/livekit/livekit / WriteTo

Method WriteTo

pkg/telemetry/statsconn.go:94–101  ·  view source on GitHub ↗
(p []byte, addr net.Addr)

Source from the content-addressed store, hash-verified

92}
93
94func (c *PacketConn) WriteTo(p []byte, addr net.Addr) (n int, err error) {
95 n, err = c.PacketConn.WriteTo(p, addr)
96 if n > 0 {
97 prometheus.IncrementBytes("", prometheus.Outgoing, uint64(n), false)
98 prometheus.IncrementPackets("", prometheus.Outgoing, 1, false)
99 }
100 return
101}
102
103func (c *PacketConn) Close() error {
104 prometheus.SubConnection(c.direction)

Callers 2

debugGoroutinesMethod · 0.80
statsWorkerMethod · 0.80

Calls 2

IncrementBytesFunction · 0.92
IncrementPacketsFunction · 0.92

Tested by

no test coverage detected