Sha256: f7c4b43fa778b50cc2cdc94ecd99358a700dd0f18c9734e2f41e49c872fe6541
Contents?: true
Size: 624 Bytes
Versions: 37
Compression:
Stored size: 624 Bytes
Contents
module EventMachine module Protocols # LineProtocol will parse out newline terminated strings from a receive_data stream # # module Server # include EM::P::LineProtocol # # def receive_line(line) # send_data("you said: #{line}") # end # end # module LineProtocol # @private def receive_data data (@buf ||= '') << data while line = @buf.slice!(/(.*)\r?\n/) receive_line(line) end end # Invoked with lines received over the network def receive_line(line) # stub end end end end
Version data entries
37 entries across 37 versions & 4 rubygems