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"); }
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())); }
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するときの名前に/を入れるとだめ。 }