class Net::InternetMessageIO
def each_message_chunk
def each_message_chunk LOG 'reading message...' LOG_off() read_bytes = 0 while (line = readuntil("\r\n")) != ".\r\n" read_bytes += line.size yield line.delete_prefix('.') end LOG_on() LOG "read message (#{read_bytes} bytes)" end