fiberchat.rb ��% �U �1 �U require 'rubygems' require 'socket' include Socket::Constants class ChatServer def initialize @reading = Array.new @writing = Array.new @clients = Hash.new end def start @server_socket = TCPServer.new('localhost', 4242) @reading.push(@server_socket) run_acceptor end private def add_client socket = @server_socket.accept_nonblock @reading.push(socket) @clients[socket] = Fib