コード例 #1
0
        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();
        }
コード例 #2
0
 protected override void OnStop()
 {
     bridge.Stop();
     bridge = null;
 }
コード例 #3
0
 internal BridgeHost(SquiggleBridge bridge, IPEndPoint externalEndPoint, IPEndPoint internalEndPoint)
 {
     this.bridge           = bridge;
     this.externalEndPoint = externalEndPoint;
     this.internalEndPoint = internalEndPoint;
 }