SetChannelDispatcher() публичный Метод

public SetChannelDispatcher ( Screenary.ChannelDispatcher dispatcher ) : void
dispatcher Screenary.ChannelDispatcher
Результат void
Пример #1
0
        /**
         * Class constructor
         */
        public Client(TransportClient transport, IClientListener clientListener)
        {
            this.clientListener = clientListener;

            dispatcher = new ChannelDispatcher();

            transport.SetChannelDispatcher(dispatcher);

            surfaceServer = new SurfaceServer(transport, this);
            dispatcher.RegisterChannel(surfaceServer);

            sessionServer = new SessionServer(transport, this);
            dispatcher.RegisterChannel(sessionServer);

            inputServer = new InputServer(transport, this);
            dispatcher.RegisterChannel(inputServer);

            transport.StartThread();

            dispatcher.OnConnect();
        }
Пример #2
0
        /**
         * Class constructor
         */
        public Client(TransportClient transport, IClientRequestListener listener)
            : base(transport)
        {
            this.thread = new Thread(ReceiverThreadProc);
            thread.Start();

            this.listener = listener;
            this.transport = transport;
            dispatcher = new ChannelDispatcher();

            transport.SetChannelDispatcher(dispatcher);

            surface = new Surface(this.transport);
            dispatcher.RegisterChannel(surface);

            session = new Session(this.transport, this);
            dispatcher.RegisterChannel(session);

            dispatcher.OnConnect();

            transport.StartThread();
        }