Monday, November 08, 2010 at 12:01 AM.

system.verbs.apps.Manila.windowTypes.getRpcServerAndPort

on getRpcServerAndPort (siteUrl, adrServer, adrPort) {
	<<Given a site URL, get the RPC server domain and port. Assume the siteUrl has already been normalized.
		<<Sun, Aug 20, 2000 at 3:30:58 PM by PBS
	
	local (urlParts = string.urlSplit (siteUrl));
	local (server = urlParts [2]);
	local (port = 80);
	if server contains ":" { //get port from server name
		port = string.nthField (server, ':', string.countFields (server, ':'));
		server = string.popSuffix (server, ':')};
	
	adrServer^ = server;
	adrPort^ = port;
	
	return (true)}



This listing is for code that runs in the OPML Editor environment. I created these listings because I wanted the search engines to index it, so that when I want to look up something in my codebase I don't have to use the much slower search functionality in my object database. Dave Winer.