Displaying 1 result from an estimated 1 matches for "send_error_without_callback".
2006 Dec 15
5
Testing event driven Socket classes
...ay = data.split(/\r?\n/m,2)
@chunked_data << data_array[0]
data = data_array[1]
# two level of protocol handling
if @chunked_data =~ /(\d{3})(.*)<(.*)?>(##(.*)##)/
if valid_protocol?(@chunked_data)
dispatch_request
else
send_error_without_callback "Invalid Protocol code"
end
@chunked_data = ""
end
end # end of while loop
end
def send_error_without_callback msg
send_data msg +"\n"
end
def dispatch_request
send_data "#{Time.now.to_s} #{@chunked_data} \n"
en...