MCPcopy Create free account
hub / github.com/dan-v/lambda-nat-proxy / OptimizedCopyWithMetrics

Function OptimizedCopyWithMetrics

pkg/shared/network.go:302–304  ·  view source on GitHub ↗

OptimizedCopyWithMetrics performs high-performance bidirectional copying with metrics tracking

(dst, src net.Conn, recordBytes func(int64))

Source from the content-addressed store, hash-verified

300
301// OptimizedCopyWithMetrics performs high-performance bidirectional copying with metrics tracking
302func OptimizedCopyWithMetrics(dst, src net.Conn, recordBytes func(int64)) {
303 OptimizedCopyWithBufferSizeAndMetrics(dst, src, OptimizedBufferSize, recordBytes)
304}
305
306// OptimizedCopyWithBufferSizeAndMetrics performs optimized copying with custom buffer size and metrics
307func OptimizedCopyWithBufferSizeAndMetrics(dst, src net.Conn, bufferSize int, recordBytes func(int64)) {

Callers 1

Tested by

no test coverage detected