(b []byte, addr net.Addr)
| 33 | } |
| 34 | |
| 35 | func (m *mockPacketConnWithCapture) WriteTo(b []byte, addr net.Addr) (n int, err error) { |
| 36 | // Capture the packet |
| 37 | packet := make([]byte, len(b)) |
| 38 | copy(packet, b) |
| 39 | m.sentPackets = append(m.sentPackets, packet) |
| 40 | m.sentAddrs = append(m.sentAddrs, addr) |
| 41 | |
| 42 | return len(b), nil |
| 43 | } |
| 44 | |
| 45 | func (m *mockPacketConnWithCapture) Close() error { return nil } |
| 46 | func (m *mockPacketConnWithCapture) LocalAddr() net.Addr { return nil } |
nothing calls this directly
no outgoing calls
no test coverage detected