examples/chatserver.rb
def handle_io_event( io, event )
		case event

		when :error
			@server.disconnect_user( self )

		when :read
			input = self.read_input
			@server.process_input( self, *input ) unless input.empty?

		when :write
			bytes_left = self.write_output
			@server.reactor.disable_events( @socket, :write ) if bytes_left.zero?

		end

	end
### Handle poll events on the socket
Handle poll events on the socket
Handle poll events on the socket
def handle_io_event( io, event )
		case event
		when :error
			@server.disconnect_user( self )
		when :read
			input = self.read_input
			@server.process_input( self, *input ) unless input.empty?
		when :write
			bytes_left = self.write_output
			@server.reactor.disable_events( @socket, :write ) if bytes_left.zero?
		end
	end
def handle_io_event ( io , event ) case event when :error @server . disconnect_user ( self ) when :read input = self . read_input @server . process_input ( self , * input ) unless input . empty? when :write bytes_left = self . write_output @server . reactor . disable_events ( @socket , :write ) if bytes_left . zero? end end
Handle poll events on the socket
Handle poll events on the socket
io
event