Files
news.gitea.happylizard.me/bin/gems/eventmachine-1.2.7/lib/em/protocols/line_protocol.rb
T
pizza2d1 4cee170d66
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 9s
Add bin and edit workflow
2026-09-16 13:11:16 -06:00

30 lines
616 B
Ruby

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 @buf.slice!(/(.*?)\r?\n/)
receive_line($1)
end
end
# Invoked with lines received over the network
def receive_line(line)
# stub
end
end
end
end