Module: Net::LDAP::Connection::SynchronousRead
- Defined in:
- lib/rex/proto/ldap.rb
Overview
:nodoc:
Instance Method Summary collapse
-
#read(length = nil, _opts = {}) ⇒ String
Read ‘length` bytes of data from the LDAP connection socket and return this data as a string.
Instance Method Details
#read(length = nil, _opts = {}) ⇒ String
Read ‘length` bytes of data from the LDAP connection socket and return this data as a string.
61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/rex/proto/ldap.rb', line 61 def read(length = nil, _opts = {}) data = '' loop do chunk = super(length - data.length) if chunk.nil? return data == '' ? nil : data end data << chunk break if data.length == length end data end |