class Server

Public Class Methods

new(host, port) click to toggle source
Calls superclass method Evented::new
# File lib/evented/server.rb, line 5
def initialize(host, port)
  super()
  @io = TCPServer.new(host, port)
  streams << self
end

Public Instance Methods

handle_read() click to toggle source
# File lib/evented/server.rb, line 15
def handle_read
  sock = @io.accept_nonblock
  emit(:accept, Stream.new(sock))
  rescue IO::WaitReadable
end
handle_write() click to toggle source
# File lib/evented/server.rb, line 21
def handle_write
  
end
to_io() click to toggle source
# File lib/evented/server.rb, line 11
def to_io
  @io
end