protected override void OnStart(string[] args) { var config = BridgeConfiguration.GetConfig(); var presenceServiceEndPoint = new IPEndPoint(config.InternalServiceBinding.EndPoint.Address, config.PresenceBinding.ServicePort); var multicastReceiveEndPoint = new IPEndPoint(config.InternalServiceBinding.EndPoint.Address, config.PresenceBinding.CallbackPort); DumpConfig(config, presenceServiceEndPoint); bridge = new SquiggleBridge(config.InternalServiceBinding.EndPoint, config.ExternalServiceBinding.EndPoint, config.PresenceBinding.MulticastEndPoint, multicastReceiveEndPoint, presenceServiceEndPoint); foreach (Target target in config.Targets) { bridge.AddTarget(target.EndPoint); } bridge.Start(); }
protected override void OnStop() { bridge.Stop(); bridge = null; }
internal BridgeHost(SquiggleBridge bridge, IPEndPoint externalEndPoint, IPEndPoint internalEndPoint) { this.bridge = bridge; this.externalEndPoint = externalEndPoint; this.internalEndPoint = internalEndPoint; }