It won’t connect. I tried it with a friend 400 miles away, and I tried
it on 2 comps here on my home network. I get a DRbConnError no matter
what variation I try. Firewall off/on, port forwarding and port
triggering off/on. The server and client snippets of relevance are
below.
#SERVER
$uri = “druby://localhost:7824”
if $0 == FILE
theApp = FXApp.new
$server = STCCGServer.new(theApp, “GameServer”)
thr = Array.new
thr << Thread.new do
theApp.create
$server.show
theApp.run
end
DRb.start_service($uri, $server.game)
thr << DRb.thread
thr.each{|thread| thread.join}
end
#CLIENT
$port = 7824
join.connect(SEL_COMMAND) do
self.hide
owner.name = namefield.text
owner.game = DRbObject.new(nil, “druby://#{ipfield.text}:#{$port}”)
File.open($deck_dir + filefield.text.strip, “r”){|file|
owner.game.add_player(namefield.text, file.gets)}
sleep(1) until owner.game.game_start
owner.make_interface
end
When I run the server and client on my machine, things work. When I run
the client and server on seperate machines listed above, I get
DRbConnError. Something so widely used like DRb must work, so I can
only assume I’ve made an error somewhere and I have no idea what it is.
Thanks,
Raj