Example #1
0
 public void Dispose()
 {
     if (listener != null)
     {
         listener.Dispose();
         listener = null;
     }
 }
Example #2
0
        public Client(GlowListener host, Socket socket, int maxPackageLength, Dispatcher dispatcher)
        {
            Host             = host;
            Socket           = socket;
            MaxPackageLength = maxPackageLength;
            Dispatcher       = dispatcher;

            _reader               = new GlowReader(GlowReader_RootReady, GlowReader_KeepAliveRequestReceived);
            _reader.Error        += GlowReader_Error;
            _reader.FramingError += GlowReader_FramingError;
        }
Example #3
0
        public EmberPlusProvider(int port, string identifier, string description)
        {
            int maxPackageLength = ProtocolParameters.MaximumPackageLength;

            dispatcher = new Dispatcher {
                Root = Node.CreateRoot()
            };
            ProviderRoot = new Node(1, dispatcher.Root, identifier)
            {
                Description = description
            };
            listener = new GlowListener(port, maxPackageLength, dispatcher);
        }