Method: Net::InternetMessageIO#each_message_chunk

Defined in:
lib/net/protocol.rb

#each_message_chunkObject

Read



248
249
250
251
252
253
254
255
256
257
258
# File 'lib/net/protocol.rb', line 248

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.sub(/\A\./, '')
  end
  LOG_on()
  LOG "read message (#{read_bytes} bytes)"
end