new

TCPServer.new([hostname,] port) => tcpserver
Class Public methods

Creates a new server socket bound to port.

If hostname is given, the socket is bound to it.

serv = TCPServer.new("127.0.0.1", 28561)
s = serv.accept
s.puts Time.now
s.close
doc_ruby_on_rails
2015-05-17 06:30:33
Comments
Leave a Comment

Please login to continue.