public DhtServer(int port) { if(port == 0) { throw new Exception("Must be started with a valid specific port number!"); } IServerChannelSinkProvider chain = new XmlRpcServerFormatterSinkProvider(); chain.Next = new SoapServerFormatterSinkProvider(); IDictionary props = new Hashtable(); props.Add("port", port); props.Add("name", "dhtsvc"); _channel = new HttpChannel(props, null, chain); ChannelServices.RegisterChannel(_channel, false); }
public void Start() { WebLabDotNetDummy.Server = this.experimentServer; IServerChannelSinkProvider formatter = new CookComputing.XmlRpc.XmlRpcServerFormatterSinkProvider(); HttpServerChannel channel = new HttpServerChannel("WebLab-Deusto", this.port, formatter); ChannelServices.RegisterChannel(channel, false); RemotingConfiguration.RegisterWellKnownServiceType( typeof(WebLabDeusto.WebLabDotNetDummy), this.servicePath, WellKnownObjectMode.Singleton ); }
public void Start() { WebLabDotNetDummy.Server = this.experimentServer; IServerChannelSinkProvider formatter = new CookComputing.XmlRpc.XmlRpcServerFormatterSinkProvider(); HttpServerChannel channel = new HttpServerChannel("WebLab-Deusto", this.port, formatter); ChannelServices.RegisterChannel(channel, false); RemotingConfiguration.RegisterWellKnownServiceType( typeof(WebLabDeusto.WebLabDotNetDummy), this.servicePath, WellKnownObjectMode.Singleton ); }
/** * Registers the server at the specified port on local machine. */ public XmlRpcManagerServer(int port) { IServerChannelSinkProvider chain = new XmlRpcServerFormatterSinkProvider(); IDictionary props = new Hashtable(); props.Add("port", port); #if BRUNET_NUNIT /* * anonymous channel. In tests we don't care about service names and * moreover, don't want system to complaint about serive name duplication * when it gets restarted frequently */ props.Add("name", ""); #else props.Add("name", "xmlrpc"); //so that this channel won't collide with dht services #endif _channel = new HttpChannel(props, null, chain); ChannelServices.RegisterChannel(_channel, false); }