Files
drip/internal/shared/protocol/safe_frame.go
Gouryella 0c19c3300c feat(tunnel): switch to yamux stream proxying and connection pooling
- Introduce pooled tunnel sessions (TunnelID/DataConnect) on client/server
- Proxy HTTP/HTTPS via raw HTTP over yamux streams; pipe TCP streams directly
- Move UI/stats into internal/shared; refactor CLI tunnel helpers; drop msgpack/hpack legacy
2025-12-13 18:03:44 +08:00

24 lines
292 B
Go

package protocol
import (
"sync"
)
type SafeFrame struct {
*Frame
once sync.Once
}
func (sf *SafeFrame) Close() error {
sf.once.Do(func() {
if sf.Frame != nil {
sf.Frame.Release()
}
})
return nil
}
func WithFrame(frame *Frame) *SafeFrame {
return &SafeFrame{Frame: frame}
}