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.
66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
# File 'lib/rex/proto/ldap.rb', line 66 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 |