// Initialise the remoting connection with http channel with binary formatter public bool RemotingConnection() { if (!_exist) { HttpChannel channel = null; try { IDictionary props = new Hashtable(); props["port"] = TechnicalSettings.RemotingServerPort; props.Add("typeFilterLevel", TypeFilterLevel.Full); //props.Add("timeout", 2000); BinaryClientFormatterSinkProvider clientProvider = new BinaryClientFormatterSinkProvider(); channel = new HttpChannel(props, clientProvider, null); ChannelServices.RegisterChannel(channel, false); //TcpChannel channel = new TcpChannel(); //ChannelServices.RegisterChannel(channel, true); var server = string.Format("http://{0}:{1}/RemoteOperation", TechnicalSettings.RemotingServer, TechnicalSettings.RemotingServerPort); _remoteOperation = (IRemoteOperation)Activator.GetObject(typeof(IRemoteOperation), server); _exist = _remoteOperation.TestRemoting(); //ChannelServices.GetChannelSinkProperties(_remoteOperation)["timeout"] = 0; } catch (Exception e) { _remotingUniqueInstance = null; ChannelServices.UnregisterChannel(channel); throw; } } return(true); }
public MagicMenuState() { _remote = (IRemoteOperation)Activator.GetObject(typeof(IRemoteOperation), "tcp://localhost:2345/RemoteOperation"); atBegin = true; this.Name = "magic"; }
public ObjectMenuState() { _remote = (IRemoteOperation)Activator.GetObject(typeof(IRemoteOperation), "tcp://localhost:2345/RemoteOperation"); atBegin = true; previousTimeStampHand = 0; this.Name = "object menu"; }
public FightState() { this.handRaised = false; this._remote = (IRemoteOperation)Activator.GetObject(typeof(IRemoteOperation), "tcp://localhost:2345/RemoteOperation"); this.shoulderCenter = -42; this.crouched = false; this.Name = "fight"; }
public SkillMenuState() { this._remote = (IRemoteOperation)Activator.GetObject(typeof(IRemoteOperation), "tcp://localhost:2345/RemoteOperation"); this.previousTimeStamp = 0; this.rightPressed = false; this.leftPressed = false; this.Name = "skill menu"; }
public MenuTabState() { _remote = (IRemoteOperation)Activator.GetObject(typeof(IRemoteOperation), "tcp://localhost:2345/RemoteOperation"); selected = new bool[4] { false, false, false, false }; this.Name = "menu"; }
public SpeechRecognition() { //on prend le client _remoteOperation = (IRemoteOperation)Activator.GetObject(typeof(IRemoteOperation), "tcp://localhost:2345/RemoteOperation"); _profileWords = new Dictionary <String, IMode>(); //Load plugins ModeLoader modeLoader = new ModeLoader(Properties.Resources.pluginFolder); foreach (IMode m in modeLoader.getListMode()) { //on prend le nom du plugin + son instance _profileWords.Add(m.getModeName(), m); } }
public void Start() { //Creation du channel de communication TcpChannel channel = new TcpChannel(); _remoteOperation = (IRemoteOperation)Activator.GetObject(typeof(IRemoteOperation), "tcp://localhost:" + port + "/RemoteOperation"); //Demarre la configuration de la kinect if (SetupKinect()) { _remoteOperation.message("Le client a démarré avec succés"); Execute(); } else { // Environment.Exit(1); } }
public SkeletTracking() { _remoteOperation = (IRemoteOperation)Activator.GetObject(typeof(IRemoteOperation), "tcp://localhost:1069/RemoteOperation"); }
public IMode() { remoteOperation = (IRemoteOperation)Activator.GetObject(typeof(IRemoteOperation), "tcp://localhost:2345/RemoteOperation"); keysPress = new List <VirtualKeyCode>(); }
// Initialise the remoting connection with http channel with binary formatter public bool RemotingConnection() { if (!_exist) { HttpChannel channel = null; try { IDictionary props = new Hashtable(); props["port"] = TechnicalSettings.RemotingServerPort; props.Add("typeFilterLevel", TypeFilterLevel.Full); //props.Add("timeout", 2000); BinaryClientFormatterSinkProvider clientProvider = new BinaryClientFormatterSinkProvider(); channel = new HttpChannel(props, clientProvider, null); ChannelServices.RegisterChannel(channel, false); //TcpChannel channel = new TcpChannel(); //ChannelServices.RegisterChannel(channel, true); var server = string.Format("http://{0}:{1}/RemoteOperation", TechnicalSettings.RemotingServer, TechnicalSettings.RemotingServerPort); _remoteOperation = (IRemoteOperation) Activator.GetObject(typeof (IRemoteOperation), server); _exist = _remoteOperation.TestRemoting(); //ChannelServices.GetChannelSinkProperties(_remoteOperation)["timeout"] = 0; } catch(Exception e) { _remoting_unique_instance = null; ChannelServices.UnregisterChannel(channel); throw; } } return true; }