English 中文(简体)
Ruby sGServer只想在当地做事
原标题:Ruby s GServer only wants to work on localhost
  • 时间:2011-01-11 20:41:49
  •  标签:
  • ruby
  • sockets

TCPServer.new(port)创建服务器,可以满足当地托管或遥控机器的要求。

但GServer.new(port)创建的服务器只能满足当地东道方的服务要求。

In looking at GServer s source, it calls TCPServer.new(@host,@port). @host defaults to DEFAULT_HOST which is 127.0.0.1.

部队派遣国:

# TCPServer.new([hostname,] port) => tcpserver
# Creates a new server socket bound to _port_.
# If _hostname_ is given, the socket is bound to it.

我愿使用GServer,但不受某个东道方名称的约束。 这样做是否可行? 网上的每一例都只使用当地东道方。

It seems that if no host is specified to GServer, GServer should not specify a host to TCPServer.

最佳回答

您的东道国名使用0.0.,对所有接口进行约束。

问题回答

暂无回答




相关问题
Ruby parser in Java

The project I m doing is written in Java and parsers source code files. (Java src up to now). Now I d like to enable parsing Ruby code as well. Therefore I am looking for a parser in Java that parses ...

rails collection_select vs. select

collection_select and select Rails helpers: Which one should I use? I can t see a difference in both ways. Both helpers take a collection and generates options tags inside a select tag. Is there a ...

RubyCAS-Client question: Rails

I ve installed RubyCAS-Client version 2.1.0 as a plugin within a rails app. It s working, but I d like to remove the ?ticket= in the url. Is this possible?

Ordering a hash to xml: Rails

I m building an xml document from a hash. The xml attributes need to be in order. How can this be accomplished? hash.to_xml

multiple ruby extension modules under one directory

Can sources for discrete ruby extension modules live in the same directory, controlled by the same extconf.rb script? Background: I ve a project with two extension modules, foo.so and bar.so which ...

Text Editor for Ruby-on-Rails

guys which text editor is good for Rubyonrails? i m using Windows and i was using E-Texteditor but its not free n its expired now can anyone plese tell me any free texteditor? n which one is best an ...

热门标签