コード例 #1
0
        private void Awake()
        {
            this.logWriter = new ConsoleLogWriter();

            if (AutoDiscoverServer)
            {
                AutoDiscoverInit();
            }

            networkConnectionAdapter = new NetworkConnectionAdapter();
        }
コード例 #2
0
        public void startSharing()
        {
            Instance       = this;
            this.logWriter = new ConsoleLogWriter();
            ClientConfig config = new ClientConfig(this.ClientRole);

            config.SetIsAudioEndpoint(this.IsAudioEndpoint);
            config.SetLogWriter(this.logWriter);
            config.SetServerAddress(this.ServerAddress);
            config.SetServerPort(this.ServerPort);
            this.xtoolsMgr = XToolsManager.Create(config);
        }
コード例 #3
0
        protected override void Awake()
        {
            base.Awake();

            logWriter = new ConsoleLogWriter();

            if (AutoDiscoverServer)
            {
                AutoDiscoverInit();
            }

            networkConnectionAdapter = new NetworkConnectionAdapter();
        }
コード例 #4
0
        private void Awake()
        {
            Instance = this;

            this.logWriter = new ConsoleLogWriter();

            ClientConfig config = new ClientConfig(this.ClientRole);

            config.SetIsAudioEndpoint(this.IsAudioEndpoint);
            config.SetLogWriter(this.logWriter);
            config.SetServerAddress(this.ServerAddress);
            config.SetServerPort(this.ServerPort);

            this.sharingMgr = SharingManager.Create(config);
        }
コード例 #5
0
        private void Awake()
        {
            Instance = this;

            this.logWriter = new ConsoleLogWriter();

            if (AutoDiscoverServer)
            {
                AutoDiscoverInit();
            }
            else
            {
                Connect();
            }
        }
コード例 #6
0
        private void Awake()
        {
            Instance = this;

            this.logWriter = new ConsoleLogWriter();

            ClientConfig config = new ClientConfig(this.ClientRole);
            config.SetIsAudioEndpoint(this.IsAudioEndpoint);
            config.SetLogWriter(this.logWriter);
            config.SetServerAddress(this.ServerAddress);
            config.SetServerPort(this.ServerPort);
            config.SetProfilerEnabled(false);

            this.sharingMgr = SharingManager.Create(config);
        }
コード例 #7
0
        protected override void Awake()
        {
            base.Awake();

            AppInstanceUniqueId = Guid.NewGuid().ToString();
            logWriter           = new ConsoleLogWriter();

            if (AutoDiscoverServer)
            {
                AutoDiscoverInit();
            }
            else
            {
                Connect();
            }
        }
コード例 #8
0
ファイル: SharingStage.cs プロジェクト: salfare1121/WIP01
        protected override void Awake()
        {
            base.Awake();

            AppInstanceUniqueId = Guid.NewGuid().ToString();
            logWriter           = new ConsoleLogWriter {
                ShowDetailedLogs = ShowDetailedLogs
            };

            if (AutoDiscoverServer)
            {
                AutoDiscoverInit();
            }
            else
            {
                ManagerInit(connectOnAwake);
            }
        }
コード例 #9
0
        private void Awake()
        {
            try
            {
                Instance = this;

                this.logWriter = new ConsoleLogWriter();

                if (AutoDiscoverServer)
                {
                    AutoDiscoverInit();
                }
                else
                {
                    Connect();
                }
            }
            catch (Exception e)
            {
                System.Diagnostics.Debug.WriteLine(e);
            }
        }
コード例 #10
0
ファイル: XToolsApp.cs プロジェクト: Microsoft/HoloToolkit
        public XToolsApp(string[] args = null)
        {
            parsedArguments = ParseCommandLine(args);
            this.logWriter = new ConsoleLogWriter();

            ClientConfig config = new ClientConfig(ClientRole.Primary);
            config.SetServerAddress(GetArgumentOrDefault("sessionserver", "localhost"));
            config.SetLogWriter(this.logWriter);

            this.Manager = SharingManager.Create(config);
            this.syncListener = new ConsoleSyncReporter();

            this.viewerConnection = this.Manager.GetPairedConnection();
            this.serverConnection = this.Manager.GetServerConnection();
            this.SessionManager = this.Manager.GetSessionManager();

            BeginPairing();

            ViewerListener = new NetworkConnectionAdapter();
            ViewerListener.ConnectedCallback += this.OnViewerConnected;
            ViewerListener.ConnectionFailedCallback += this.OnViewerConnectionFailed;
            ViewerListener.DisconnectedCallback += this.OnViewerDisconnected;
            viewerConnection.AddListener((byte)MessageID.StatusOnly, ViewerListener);

            ServerListener = new NetworkConnectionAdapter();
            ServerListener.ConnectedCallback += this.OnSessionConnected;
            ServerListener.ConnectionFailedCallback += this.OnSessionConnectionFailed;
            ServerListener.DisconnectedCallback += this.OnSessionDisconnected;
            serverConnection.AddListener((byte)MessageID.StatusOnly, ServerListener);

            this.rootObject = this.Manager.GetRootSyncObject();
            this.rootObject.AddListener(this.syncListener);

            // Listen for new sessions
            SessionManagerListener = new XToolsSessionManagerListener();
            this.SessionManager.AddListener(SessionManagerListener);
        }