Top Level Namespace
Defined Under Namespace
Modules: BrowserAppBase, Output Classes: AppMainBase, MyApp, Search, WsServer
Instance Method Summary collapse
Instance Method Details
#config_json_hash(json) ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/template/wsserver.rb', line 6 def config_json_hash(json) config = {} json.each do |j| config[j["name"]] = j["value"] end return config end |
#get_unused_port ⇒ Object
空きポートを取得
60 61 62 63 64 65 |
# File 'lib/template/start.rb', line 60 def get_unused_port s = TCPServer.open(0) port = s.addr[1] s.close return port end |