Revert "修复一个导致 TPROXY 下 v2ray 断流的问题"

This commit is contained in:
Kslr
2020-05-31 11:58:24 +08:00
committed by GitHub
parent b355c7089b
commit db29bea2ed
3 changed files with 1 additions and 28 deletions
-14
View File
@@ -8,11 +8,6 @@ import (
"v2ray.com/core/common/signal"
)
// ActivityNotifiable is a object that accepts activity notification outside the object
type ActivityNotifiable interface {
NotifyActivity() error
}
type dataHandler func(MultiBuffer)
type copyHandler struct {
@@ -36,15 +31,6 @@ func UpdateActivity(timer signal.ActivityUpdater) CopyOption {
}
}
// NotifyActivity is a CopyOption to notify activity on each data copy operation.
func NotifyActivity(notifier ActivityNotifiable) CopyOption {
return func(handler *copyHandler) {
handler.onData = append(handler.onData, func(MultiBuffer) {
notifier.NotifyActivity()
})
}
}
// CountSize is a CopyOption that sums the total size of data copied into the given SizeCounter.
func CountSize(sc *SizeCounter) CopyOption {
return func(handler *copyHandler) {