class Hokaido::Server

Public Class Methods

new(host, port) click to toggle source
# File lib/hokaido/server.rb, line 51
def initialize(host, port)
  @server = TCPServer.new(host, port)

  async.run
end

Public Instance Methods

run() click to toggle source
# File lib/hokaido/server.rb, line 61
def run
  loop do
    ConnectionHandler.new(@server.accept).link Actor.current
  end
end
shutdown() click to toggle source
# File lib/hokaido/server.rb, line 57
def shutdown
  @server.close if @server
end