Method: Net::InternetMessageIO#each_message_chunk
- Defined in:
- lib/net/protocol.rb
#each_message_chunk ⇒ Object
Read
334 335 336 337 338 339 340 341 342 343 344 |
# File 'lib/net/protocol.rb', line 334 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 |