J
Joy W.
Hi. How can I get peeraddr (client hostname and ipaddress) in a simple
server like the following? Thanks.
#!/usr/bin/ruby --debug
require 'soap/rpc/standaloneServer'
PS = 'passphrase'
class MyClass
...
end
class Server < SOAP::RPC::StandaloneServer
def on_init
Pq = MyClass.new
...
end
end
svr = Server.new('Pq', PS, '0.0.0.0', 4241)
trap('INT') { svr.shutdown }
svr.start
server like the following? Thanks.
#!/usr/bin/ruby --debug
require 'soap/rpc/standaloneServer'
PS = 'passphrase'
class MyClass
...
end
class Server < SOAP::RPC::StandaloneServer
def on_init
Pq = MyClass.new
...
end
end
svr = Server.new('Pq', PS, '0.0.0.0', 4241)
trap('INT') { svr.shutdown }
svr.start