override public void Start()
{
ProtocolLog.WriteIf(ProtocolLog.LinkDebug,
String.Format("{0}: Starting Connector: {1}, {2}",
_local_node.Address, _sender, State));
AbortCheck ac = _abort.Value;
if (ac != null)
{
if (ac(this))
{
//We are no longer needed:
QueueCloseHandler(null, null);
return;
}
}
RpcManager rpc = _local_node.Rpc;
Channel results = new Channel();
results.EnqueueEvent += this.EnqueueHandler;
results.CloseEvent += this.QueueCloseHandler;
try {
rpc.Invoke(_sender, results, "sys:ctm.ConnectTo", _ctm.ToDictionary());
}
catch {
//Looks like the _sender had some problem:
QueueCloseHandler(null, null);
}
}