Beispiel #1
0
        static void Main(string[] args)
        {
            int port;
             int maxPackageLength;

             var settings = Settings.Load();

             ParseArgs(args, out port, out maxPackageLength);

             Console.WriteLine("Ember+ Proxy v{0} (GlowDTD v{1} - EmBER v{2}) started.",
                           typeof(Program).Assembly.GetName().Version,
                           GlowReader.UshortVersionToString(EmberLib.Glow.GlowDtd.Version),
                           GlowReader.UshortVersionToString(EmberLib.EmberEncoding.Version));

             using(var proxy = new Proxy(settings.EndPoints, maxPackageLength))
             {
            proxy.Connect();

            using(var listener = new Provider.GlowListener(port, maxPackageLength, proxy))
            {
               Console.WriteLine("Listening on port {0}. Press enter to quit...", port);
               Console.ReadLine();
            }
             }
        }
        static void Main(string[] args)
        {
            int port;
            int maxPackageLength;

            var settings = Settings.Load();

            ParseArgs(args, out port, out maxPackageLength);

            Console.WriteLine("Ember+ Proxy v{0} (GlowDTD v{1} - EmBER v{2}) started.",
                              typeof(Program).Assembly.GetName().Version,
                              GlowReader.UshortVersionToString(EmberLib.Glow.GlowDtd.Version),
                              GlowReader.UshortVersionToString(EmberLib.EmberEncoding.Version));

            using (var proxy = new Proxy(settings.EndPoints, maxPackageLength))
            {
                proxy.Connect();

                using (var listener = new Provider.GlowListener(port, maxPackageLength, proxy))
                {
                    Console.WriteLine("Listening on port {0}. Press enter to quit...", port);
                    Console.ReadLine();
                }
            }
        }
Beispiel #3
0
        public Client(GlowListener host, Socket socket, int maxPackageLength, Proxy proxy)
        {
            Host = host;
             Socket = socket;
             MaxPackageLength = maxPackageLength;
             Proxy = proxy;

             _reader = new GlowReader(GlowReader_RootReady, GlowReader_KeepAliveRequestReceived);
             _reader.Error += GlowReader_Error;
             _reader.FramingError += GlowReader_FramingError;
        }
Beispiel #4
0
        public Client(GlowListener host, Socket socket, int maxPackageLength, Proxy proxy)
        {
            Host             = host;
            Socket           = socket;
            MaxPackageLength = maxPackageLength;
            Proxy            = proxy;

            _reader               = new GlowReader(GlowReader_RootReady, GlowReader_KeepAliveRequestReceived);
            _reader.Error        += GlowReader_Error;
            _reader.FramingError += GlowReader_FramingError;
        }