Method: Gem::Net::InternetMessageIO#each_message_chunk
- Defined in:
- lib/rubygems/vendor/net-protocol/lib/net/protocol.rb
#each_message_chunk ⇒ Object
Read
373 374 375 376 377 378 379 380 381 382 383 |
# File 'lib/rubygems/vendor/net-protocol/lib/net/protocol.rb', line 373 def 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 |