コード例 #1
0
ファイル: pubsub.go プロジェクト: ben0x007/v2ray-core
func init() {
	app.RegisterApp(APP_ID, func(context app.Context, obj interface{}) interface{} {
		pubsub := obj.(pubsubWithContext)
		return &contextedPubsub{
			context: context,
			pubsub:  pubsub,
		}
	})
}
コード例 #2
0
ファイル: dispatcher.go プロジェクト: ben0x007/v2ray-core
func init() {
	app.RegisterApp(APP_ID, func(context app.Context, obj interface{}) interface{} {
		packetDispatcher := obj.(packetDispatcherWithContext)
		return &contextedPacketDispatcher{
			context:          context,
			packetDispatcher: packetDispatcher,
		}
	})
}
コード例 #3
0
ファイル: proxyman.go プロジェクト: ben0x007/v2ray-core
func init() {
	app.RegisterApp(APP_ID_INBOUND_MANAGER, func(context app.Context, obj interface{}) interface{} {
		manager := obj.(inboundHandlerManagerWithContext)
		return &inboundHandlerManagerWithContextImpl{
			context: context,
			manager: manager,
		}
	})
}
コード例 #4
0
ファイル: dns.go プロジェクト: ben0x007/v2ray-core
func init() {
	app.RegisterApp(APP_ID, func(context app.Context, obj interface{}) interface{} {
		dcContext := obj.(dnsCacheWithContext)
		return &contextedDnsCache{
			context:  context,
			dnsCache: dcContext,
		}
	})
}