mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-12-22 01:57:12 -05:00
comments
This commit is contained in:
parent
2f3670f60b
commit
1d001c090b
@ -29,7 +29,7 @@ type cachedReader struct {
|
||||
func (r *cachedReader) Cache(b *buf.Buffer) {
|
||||
mb, _ := r.reader.ReadMultiBufferWithTimeout(time.Millisecond * 100)
|
||||
if !mb.IsEmpty() {
|
||||
r.cache.WriteMultiBuffer(mb)
|
||||
common.Must(r.cache.WriteMultiBuffer(mb))
|
||||
}
|
||||
common.Must(b.Reset(func(x []byte) (int, error) {
|
||||
return r.cache.Copy(x), nil
|
||||
|
@ -1,3 +1,4 @@
|
||||
// Package dns is an implementation of core.DNS feature.
|
||||
package dns
|
||||
|
||||
//go:generate go run $GOPATH/src/v2ray.com/core/common/errors/errorgen/main.go -pkg dns -path App,DNS
|
||||
|
@ -68,6 +68,7 @@ func (p *Policy) ToCorePolicy() core.Policy {
|
||||
return cp
|
||||
}
|
||||
|
||||
// ToCorePolicy converts this SystemPolicy to core.SystemPolicy.
|
||||
func (p *SystemPolicy) ToCorePolicy() core.SystemPolicy {
|
||||
return core.SystemPolicy{
|
||||
Stats: core.SystemStatsPolicy{
|
||||
|
@ -45,6 +45,7 @@ func (m *Instance) ForLevel(level uint32) core.Policy {
|
||||
return core.DefaultPolicy()
|
||||
}
|
||||
|
||||
// ForSystem implements core.PolicyManager.
|
||||
func (m *Instance) ForSystem() core.SystemPolicy {
|
||||
if m.system == nil {
|
||||
return core.SystemPolicy{}
|
||||
|
@ -1,3 +1,4 @@
|
||||
// Package policy is an implementation of core.PolicyManager feature.
|
||||
package policy
|
||||
|
||||
//go:generate go run $GOPATH/src/v2ray.com/core/common/errors/errorgen/main.go -pkg policy -path App,Policy
|
||||
|
Loading…
Reference in New Issue
Block a user