/** <summary>Starts services such as shutdown, rpcdht, and xmlrpc. If you wish to have your own shutdown path, edit OnExit instead of this. This can be called multiple times without negative effect.</summary> */ public virtual void StartServices() { _shutdown = Shutdown.GetShutdown(); if(_shutdown != null) { _shutdown.OnExit += OnExit; } if(_node_config.RpcDht != null && _node_config.RpcDht.Enabled) { if(_ds == null) { _ds = new DhtServer(_node_config.RpcDht.Port); } _ds.Update(_dht); } if(_node_config.XmlRpcManager != null && _node_config.XmlRpcManager.Enabled) { if(_xrm == null) { _xrm = new XmlRpcManagerServer(_node_config.XmlRpcManager.Port); } _xrm.Update(_node); } }
/** <summary>This stops all services such as Xml and DhtRpc. Call this instead of SuspendServices if the node is shutting down or services are no longer required and you would like to release the ports</summary> */ public virtual void StopServices() { if(_ds != null) { _ds.Stop(); _ds = null; } if(_xrm != null) { _xrm.Stop(); _xrm = null; } }
public void InitFixture() { ConsoleTraceListener myWriter = new ConsoleTraceListener(); Debug.Listeners.Add(myWriter); _rpc = XmlRpcManagerClient.GetXmlRpcManager("127.0.0.1", Port, true); Node n = new StructuredNode(new AHAddress(new RNGCryptoServiceProvider())); _mrm = MockRpcManager.GetInstance(n); _server = new XmlRpcManagerServer(Port); _server.Update(n, _mrm); Debug.WriteLine(string.Format("Server started at {0}", Port)); }
/** <summary>This stops all services such as Xml and DhtRpc. Call this instead of SuspendServices if the node is shutting down or services are no longer required and you would like to release the ports</summary> */ public virtual void StopServices() { if(_c_ds != null) { _c_ds.Stop(); _c_ds = null; } if(_c_xrm != null) { _c_xrm.Stop(); _c_xrm = null; } if(_q_ds != null) { _q_ds.Stop(); _q_ds = null; } if(_q_xrm != null) { _q_xrm.Stop(); _q_xrm = null; } }
/** <summary>Starts services such as shutdown, rpcdht, and xmlrpc. If you wish to have your own shutdown path, edit OnExit instead of this. This can be called multiple times without negative effect.</summary> */ public virtual void StartServices() { _shutdown = Shutdown.GetShutdown(); if(_shutdown != null) { _shutdown.OnExit += OnExit; } if(_c_node_config.RpcDht != null && _c_node_config.RpcDht.Enabled) { if(_c_ds == null) { _c_ds = new DhtServer(_c_node_config.RpcDht.Port); } _c_ds.Update(_c_dht,"cache"); } if(_q_node_config.RpcDht != null && _q_node_config.RpcDht.Enabled) { if(_q_ds == null) { _q_ds = new DhtServer(_q_node_config.RpcDht.Port); } _q_ds.Update(_q_dht,"query"); } if(_c_node_config.XmlRpcManager != null && _c_node_config.XmlRpcManager.Enabled) { if(_c_xrm == null) { _c_xrm = new XmlRpcManagerServer(_c_node_config.XmlRpcManager.Port); } _c_xrm.Update(_c_node,"cache"); } if(_q_node_config.XmlRpcManager != null && _q_node_config.XmlRpcManager.Enabled) { if(_q_xrm == null) { _q_xrm = new XmlRpcManagerServer(_q_node_config.XmlRpcManager.Port); } _q_xrm.Update(_q_node,"query"); } }
/// <summary>Starts services such as shutdown, rpcdht, and xmlrpc. If you wish /// to have your own shutdown path, edit OnExit instead of this. This can be /// called multiple times without negative effect.</summary> public virtual void StartServices() { _shutdown.OnExit += OnExit; if(_node_config.XmlRpcManager.Enabled) { if(_xrm == null) { _xrm = new XmlRpcManagerServer(_node_config.XmlRpcManager.Port); } _xrm.Add(_node); new RpcDht(_dht, _node); } }
internal Dumper(XmlRpcManagerServer outer) { _outer = outer; }