Class: Atoms::Server
- Inherits:
-
Object
- Object
- Atoms::Server
- Defined in:
- lib/atoms.rb
Class Method Summary collapse
Class Method Details
.run(host = "0.0.0.0", port = 5000) ⇒ Object
8 9 10 11 12 13 |
# File 'lib/atoms.rb', line 8 def self.run(host = "0.0.0.0", port = 5000) @server = Cool.io::TCPServer.new(host, port, Atoms::Connection) @server.attach(Cool.io::Loop.default) puts "Echo server listening on #{host}:#{port}" Cool.io::Loop.default.run end |