1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2025-12-26 20:15:26 -05:00

remove context functions for allow passive connection

This commit is contained in:
Darien Raymond
2017-02-08 10:37:53 +01:00
parent dc8e94ac79
commit 27b0401c20

View File

@@ -100,12 +100,3 @@ func ResolvedIPsFromContext(ctx context.Context) ([]net.Address, bool) {
ips, ok := ctx.Value(resolvedIPsKey).([]net.Address)
return ips, ok
}
func ContextWithAllowPassiveConnection(ctx context.Context, allowPassiveConnection bool) context.Context {
return context.WithValue(ctx, allowPassiveConnKey, allowPassiveConnection)
}
func AllowPassiveConnectionFromContext(ctx context.Context) (bool, bool) {
allow, ok := ctx.Value(allowPassiveConnKey).(bool)
return allow, ok
}