Monday, April 04, 2011 at 1:06 AM.
rssCloudRpcHandlers.firewallCheck
on firewallCheck (ip) { <<Changes <<8/24/09; 3:20:22 PM by DW <<Created. Return true if we believe the caller is behind a firewall or NAT. if client != ip { //he's behind a NAT return (true)} //he thinks his IP address is different from what we were told it is else { try { local (server = "xmlrpc://" + ip + ":5337/RPC2"); local (state = states.nthstate (random (1, 50))); local (result = [server].river2.testFirewall (state)); if result != string.upper (state) { return (true)}} else { return (true)}}; return (false)}
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.