mirror of https://github.com/v2ray/v2ray-core
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
873 B
41 lines
873 B
package core
|
|
|
|
import (
|
|
"v2ray.com/core/common"
|
|
)
|
|
|
|
func (this *AllocationStrategyConcurrency) GetValue() uint32 {
|
|
if this == nil {
|
|
return 3
|
|
}
|
|
return this.Value
|
|
}
|
|
|
|
func (this *AllocationStrategyRefresh) GetValue() uint32 {
|
|
if this == nil {
|
|
return 5
|
|
}
|
|
return this.Value
|
|
}
|
|
|
|
func (this *InboundConnectionConfig) GetAllocationStrategyValue() *AllocationStrategy {
|
|
if this.AllocationStrategy == nil {
|
|
return &AllocationStrategy{}
|
|
}
|
|
return this.AllocationStrategy
|
|
}
|
|
|
|
func (this *InboundConnectionConfig) GetTypedSettings() (interface{}, error) {
|
|
if this.GetSettings() == nil {
|
|
return nil, common.ErrBadConfiguration
|
|
}
|
|
return this.GetSettings().GetInstance()
|
|
}
|
|
|
|
func (this *OutboundConnectionConfig) GetTypedSettings() (interface{}, error) {
|
|
if this.GetSettings() == nil {
|
|
return nil, common.ErrBadConfiguration
|
|
}
|
|
return this.GetSettings().GetInstance()
|
|
}
|