GetChannelUri() 공개 메소드

public GetChannelUri ( ) : String
리턴 String
예제 #1
0
        public ParameterServer(int portNumber)
        {
            _channel = new HttpServerChannel("param", portNumber, new XmlRpcServerFormatterSinkProvider());
            var tmp = new Uri(_channel.GetChannelUri());

            ParameterServerUri = new Uri("http://" + Ros.HostName + ":" + tmp.Port + "/param");

            ChannelServices.RegisterChannel(_channel, false);
            RemotingServices.Marshal(this, "param");
        }
예제 #2
0
        public MasterServer(int portNumber)
        {
            _channel = new HttpServerChannel("master", portNumber, new XmlRpcServerFormatterSinkProvider());

            var tmp = new Uri(_channel.GetChannelUri());

            MasterUri = new Uri("http://" + Ros.HostName + ":" + tmp.Port);

            ChannelServices.RegisterChannel(_channel, false);
            RemotingServices.Marshal(this, "/");

            _parameterServer = new ParameterServer(MasterUri);

            _logger.Info(m => m("MasterServer launched {0}", MasterUri.ToString()));
        }
예제 #3
0
        internal SlaveServer(string nodeId, int portNumber, TopicContainer topicContainer)
        {
            NodeId = nodeId;
            _logger = RosOutLogManager.GetCurrentNodeLogger(NodeId);

            _topicContainer = topicContainer;
            _tcpRosListener = new Dictionary<string, TcpRosListener>();

            string slaveName = "slave" + Guid.NewGuid().ToString("N");

            _channel = new HttpServerChannel(slaveName, portNumber, new XmlRpcServerFormatterSinkProvider());
            var tmp = new Uri(_channel.GetChannelUri());

            SlaveUri = new Uri("http://" + Ros.HostName + ":" + tmp.Port + "/" + slaveName);

            ChannelServices.RegisterChannel(_channel, false);
            RemotingServices.Marshal(this, slaveName); //Marshalするときの名前に/を入れるとだめ。
        }