Ejemplo n.º 1
0
 static void StartService()
 {
     if (!refMgr.IsRunning)
     {
         refMgr.StartReflector();
         System.Threading.Thread.Sleep(1000);
         Console.WriteLine(Strings.ServiceStartedSuccessfully);
         if ((ReflectorMgr.EnabledTrafficTypes & TrafficType.IPv4) == TrafficType.IPv4)
         {
             Console.WriteLine(string.Format(CultureInfo.CurrentCulture, Strings.UnicastSideRtpEndpoint,
                                             ReflectorMgr.Sockets.SockUCv4RTP.LocalEndPoint));
             Console.WriteLine(string.Format(CultureInfo.CurrentCulture, Strings.UnicastSideRtcpEndpoint,
                                             ReflectorMgr.Sockets.SockUCv4RTCP.LocalEndPoint));
             Console.WriteLine(string.Format(CultureInfo.CurrentCulture, Strings.MulticastSideRtpEndpoint,
                                             ReflectorMgr.Sockets.SockMCv4RTP.LocalEndPoint));
             Console.WriteLine(string.Format(CultureInfo.CurrentCulture, Strings.MulticastSideRtcpEndpoint,
                                             ReflectorMgr.Sockets.SockMCv4RTCP.LocalEndPoint));
         }
         if ((ReflectorMgr.EnabledTrafficTypes & TrafficType.IPv6) == TrafficType.IPv6)
         {
             Console.WriteLine(string.Format(CultureInfo.CurrentCulture,
                                             Strings.IPv6UnicastSideRtpEndpoint, ReflectorMgr.Sockets.SockUCv6RTP.LocalEndPoint));
             Console.WriteLine(string.Format(CultureInfo.CurrentCulture,
                                             Strings.IPv6UnicastSideRtcpEndpoint, ReflectorMgr.Sockets.SockUCv6RTCP.LocalEndPoint));
             Console.WriteLine(string.Format(CultureInfo.CurrentCulture,
                                             Strings.IPv6MulticastSideRtpEndpoint, ReflectorMgr.Sockets.SockMCv6RTP.LocalEndPoint));
             Console.WriteLine(string.Format(CultureInfo.CurrentCulture,
                                             Strings.IPv6MulticastSideRtcpEndpoint, ReflectorMgr.Sockets.SockMCv6RTCP.LocalEndPoint));
         }
         Console.WriteLine();
         PrintHelp();
         Console.WriteLine();
     }
     else
     {
         Console.WriteLine(Strings.ServiceAlreadyStarted);
         if ((ReflectorMgr.EnabledTrafficTypes & TrafficType.IPv4) == TrafficType.IPv4)
         {
             Console.WriteLine(string.Format(CultureInfo.CurrentCulture, Strings.UnicastSideRtpEndpoint,
                                             ReflectorMgr.Sockets.SockUCv4RTP.LocalEndPoint));
             Console.WriteLine(string.Format(CultureInfo.CurrentCulture, Strings.UnicastSideRtcpEndpoint,
                                             ReflectorMgr.Sockets.SockUCv4RTCP.LocalEndPoint));
             Console.WriteLine(string.Format(CultureInfo.CurrentCulture, Strings.MulticastSideRtpEndpoint,
                                             ReflectorMgr.Sockets.SockMCv4RTP.LocalEndPoint));
             Console.WriteLine(string.Format(CultureInfo.CurrentCulture, Strings.MulticastSideRtcpEndpoint,
                                             ReflectorMgr.Sockets.SockMCv4RTCP.LocalEndPoint));
         }
         if ((ReflectorMgr.EnabledTrafficTypes & TrafficType.IPv6) == TrafficType.IPv6)
         {
             Console.WriteLine(string.Format(CultureInfo.CurrentCulture,
                                             Strings.IPv6UnicastSideRtpEndpoint, ReflectorMgr.Sockets.SockUCv6RTP.LocalEndPoint));
             Console.WriteLine(string.Format(CultureInfo.CurrentCulture,
                                             Strings.IPv6UnicastSideRtcpEndpoint, ReflectorMgr.Sockets.SockUCv6RTCP.LocalEndPoint));
             Console.WriteLine(string.Format(CultureInfo.CurrentCulture,
                                             Strings.IPv6MulticastSideRtpEndpoint, ReflectorMgr.Sockets.SockMCv6RTP.LocalEndPoint));
             Console.WriteLine(string.Format(CultureInfo.CurrentCulture,
                                             Strings.IPv6MulticastSideRtcpEndpoint, ReflectorMgr.Sockets.SockMCv6RTCP.LocalEndPoint));
         }
     }
 }
Ejemplo n.º 2
0
        protected override void OnStart(string[] args)
        {
            refMgr.StartReflector();
            Thread form = new Thread(new ThreadStart(FormProc));

            form.IsBackground = true;
            form.Start();
        }
Ejemplo n.º 3
0
        protected override void OnStart(string[] args)
        {
            refMgr.StartReflector();

            // Register the server channel.
            IDictionary channelProperties = new Hashtable();

            channelProperties["port"] = ConfigurationManager.AppSettings.Get(AppConfig.AdminPort);
            channelProperties["rejectRemoteRequests"] = true;

            channel = new TcpServerChannel(channelProperties, null);
            ChannelServices.RegisterChannel(channel, false);

            // Expose an object for remote calls
            RemotingConfiguration.RegisterWellKnownServiceType(typeof(AdminRemoting),
                                                               "ReflectorAdminEndpoint", WellKnownObjectMode.Singleton);
        }
Ejemplo n.º 4
0
 static void StartService()
 {
     if (!refMgr.IsRunning)
     {
         refMgr.StartReflector();
         System.Threading.Thread.Sleep(1000);
         Console.WriteLine("Service started successfully.");
         if ((ReflectorMgr.EnabledTrafficTypes & TrafficType.IPv4) == TrafficType.IPv4)
         {
             Console.WriteLine("Unicast side RTP EndPoint: " + ReflectorMgr.Sockets.SockUCv4RTP.LocalEndPoint);
             Console.WriteLine("Unicast side RTCP EndPoint: " + ReflectorMgr.Sockets.SockUCv4RTCP.LocalEndPoint);
             Console.WriteLine("Multicast side RTP EndPoint: " + ReflectorMgr.Sockets.SockMCv4RTP.LocalEndPoint);
             Console.WriteLine("Multicast side RTCP EndPoint: " + ReflectorMgr.Sockets.SockMCv4RTCP.LocalEndPoint);
         }
         if ((ReflectorMgr.EnabledTrafficTypes & TrafficType.IPv6) == TrafficType.IPv6)
         {
             Console.WriteLine("IPv6 Unicast side RTP EndPoint: " + ReflectorMgr.Sockets.SockUCv6RTP.LocalEndPoint);
             Console.WriteLine("IPv6 Unicast side RTCP EndPoint: " + ReflectorMgr.Sockets.SockUCv6RTCP.LocalEndPoint);
             Console.WriteLine("IPv6 Multicast side RTP EndPoint: " + ReflectorMgr.Sockets.SockMCv6RTP.LocalEndPoint);
             Console.WriteLine("IPv6 Multicast side RTCP EndPoint: " + ReflectorMgr.Sockets.SockMCv6RTCP.LocalEndPoint);
         }
         Console.WriteLine();
         PrintHelp();
         Console.WriteLine();
     }
     else
     {
         Console.WriteLine("Service already started.");
         if ((ReflectorMgr.EnabledTrafficTypes & TrafficType.IPv4) == TrafficType.IPv4)
         {
             Console.WriteLine("Unicast side RTP EndPoint: " + ReflectorMgr.Sockets.SockUCv4RTP.LocalEndPoint);
             Console.WriteLine("Unicast side RTCP EndPoint: " + ReflectorMgr.Sockets.SockUCv4RTCP.LocalEndPoint);
             Console.WriteLine("Multicast side RTP EndPoint: " + ReflectorMgr.Sockets.SockMCv4RTP.LocalEndPoint);
             Console.WriteLine("Multicast side RTCP EndPoint: " + ReflectorMgr.Sockets.SockMCv4RTCP.LocalEndPoint);
         }
         if ((ReflectorMgr.EnabledTrafficTypes & TrafficType.IPv6) == TrafficType.IPv6)
         {
             Console.WriteLine("IPv6 Unicast side RTP EndPoint: " + ReflectorMgr.Sockets.SockUCv6RTP.LocalEndPoint);
             Console.WriteLine("IPv6 Unicast side RTCP EndPoint: " + ReflectorMgr.Sockets.SockUCv6RTCP.LocalEndPoint);
             Console.WriteLine("IPv6 Multicast side RTP EndPoint: " + ReflectorMgr.Sockets.SockMCv6RTP.LocalEndPoint);
             Console.WriteLine("IPv6 Multicast side RTCP EndPoint: " + ReflectorMgr.Sockets.SockMCv6RTCP.LocalEndPoint);
         }
     }
 }