aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/share/ruby/gridserv.rb
diff options
context:
space:
mode:
authorSean Dague2008-10-01 18:57:37 +0000
committerSean Dague2008-10-01 18:57:37 +0000
commit5d5a886b3401d4b229485014186b917c9bb1b530 (patch)
tree1423bd40b6a431aacf4c64bed44f663ffe23162a /share/ruby/gridserv.rb
parentremove mysql_connection.ini.example, no one should be using this any (diff)
downloadopensim-SC_OLD-5d5a886b3401d4b229485014186b917c9bb1b530.zip
opensim-SC_OLD-5d5a886b3401d4b229485014186b917c9bb1b530.tar.gz
opensim-SC_OLD-5d5a886b3401d4b229485014186b917c9bb1b530.tar.bz2
opensim-SC_OLD-5d5a886b3401d4b229485014186b917c9bb1b530.tar.xz
remove these old ruby grid servers as they are really old (like a year
old). A project like this is welcomed to come back on opensim forge.
Diffstat (limited to 'share/ruby/gridserv.rb')
-rwxr-xr-xshare/ruby/gridserv.rb69
1 files changed, 0 insertions, 69 deletions
diff --git a/share/ruby/gridserv.rb b/share/ruby/gridserv.rb
deleted file mode 100755
index 03cb4d1..0000000
--- a/share/ruby/gridserv.rb
+++ /dev/null
@@ -1,69 +0,0 @@
1require "webrick"
2require "xmlrpc/server"
3require 'xmlrpc/client'
4require 'pp'
5require 'config.rb'
6
7#
8# Dummy grid server
9#
10#
11
12class SimServlet < WEBrick::HTTPServlet::AbstractServlet
13 # does actually nothing
14 def do_POST(req, res)
15 STDERR.print "----\n"
16 end
17end
18
19$SimUUID = ""
20
21s = XMLRPC::WEBrickServlet.new
22s.add_handler("map_block") do |param|
23 # does just enough to login.. if you try using "map" you will cause the exception
24 # and hang the client
25 responseData = Hash.new
26 responseData["sim-profiles"] = [ ]
27 responseData
28end
29
30s.add_handler("simulator_login") do |param|
31 sc = SimConfig.new
32 responseData = Hash.new
33 STDERR.print "simulator login: " + param.inspect + "\n"
34 $SimUUID = param["UUID"]
35
36 responseData["UUID"] = param["UUID"]
37 responseData["region_locx"] = sc.cfgSimX
38 responseData["region_locy"] = sc.cfgSimY
39 responseData["regionname"] = "DalienLand"
40 responseData["estate_id"] = "1"
41 responseData["neighbours"] = [ ]
42 responseData["sim_ip"] = sc.cfgSimIP
43 responseData["sim_port"] = sc.cfgSimPort
44 responseData["asset_url"] = sc.cfgAssetServerUrl
45 responseData["asset_sendkey"] = ""
46 responseData["asset_recvkey"] = ""
47 responseData["user_url"] = sc.cfgUserServerUrl
48 responseData["user_sendkey"] = ""
49 responseData["user_recvkey"] = ""
50 responseData["authkey"] = ""
51
52 responseData
53
54end
55
56s.set_default_handler do |name, *args|
57 STDERR.print "Unknown method #{name}, #{args.inspect}\n\n"
58 raise XMLRPC::FaultException.new(-99, "Method #{name} missing" +
59 " or wrong number of parameters!")
60end
61
62httpserver = WEBrick::HTTPServer.new(:Port => 8001)
63httpserver.mount("/", s)
64httpserver.mount("/sims", SimServlet)
65
66trap(:INT) { httpserver.shutdown } # use 1 instead of "HUP" on Windows
67httpserver.start
68
69