Ejemplo n.º 1
0
        private void HandleClientConnected(object o, ISClientListener.ClientConnectedArgs args)
        {
            ISServerSocket client = args.Socket;

            if (!TryAcceptClient(client))
            {
                return;
            }

            client.DisplayConfiguration = new Displays.DisplayConfig(args.DisplayConfig);
            client.AcceptClient();
            AssignClientEvents(client);

            if (!startArgs.HasArg(StartArguments.NoUdp))
            {
                if (udpHost.SocketBound)
                {
                    udpHost.InitClient(client);
                }
            }
            else
            {
                client.SetUdpEnabled(false);
            }

            ClientConfig.ReloadClientConfigs(clientMan);
            ClientConnected?.Invoke(this, new ISClientInfoModel(client, clientMan));
        }
Ejemplo n.º 2
0
        private void StartUdpHost(StartOptions args, int bindPort)
        {
            if (args.HasArg(StartArguments.NoUdp))
            {
                return;
            }

            udpHost = new ISUdpServer(clientMan, bindPort);
        }
Ejemplo n.º 3
0
        private void StartModules(StartOptions args, ISServerDependencies dependencies)
        {
            cbManager   = args.HasArg(StartArguments.NoClipboard) ? new NullClipboardManager() : dependencies.ClipboardManager;
            dragDropMan = args.HasArg(StartArguments.NoDragDrop) ? new NullDragDropManager() : dependencies.DragDropManager;
            inputMan    = dependencies.InputManager;
            outMan      = dependencies.OutputManager;
            displayMan  = dependencies.DisplayManager;

            cbController    = new GlobalClipboardController(cbManager, clientMan);
            ddController    = new GlobalDragDropController(dragDropMan, clientMan);
            fileController  = new FileAccessController();
            inputController = new GlobalInputController(clientMan, inputMan, udpHost);

            cbManager.Start();
            dragDropMan.Start();
            inputMan.Start();
            outMan.Start();
            displayMan.Start();
        }