SplitPath() public static method

public static SplitPath ( TransportAddress ta, string &path ) : TransportAddress
ta TransportAddress
path string
return TransportAddress
Example #1
0
        /** creates a new outgoing Edge using the pathing protocol
         */
        public override void CreateEdgeTo(TransportAddress ta,
                                          EdgeListener.EdgeCreationCallback ecb)
        {
            if (!IsStarted)
            {
                throw new EdgeException("PathEdgeListener is not started");
            }
            string           rempath;
            TransportAddress base_ta = PathELManager.SplitPath(ta, out rempath);

            if (_path == PathELManager.Root && rempath == PathELManager.Root)
            {
                /*
                 * This is "normal" case, and we can skip all this stuff
                 */
                _el.CreateEdgeTo(ta, ecb);
            }
            else
            {
                CreateState cs = new CreateState(this, rempath, _path, ecb);

                /*
                 * Make the underlying Edge:
                 */
                _el.CreateEdgeTo(base_ta, cs.HandleEC);
            }
        }