Skip to content

Commit 79c04ce

Browse files
committed
Document the #write, #read methods
1 parent ca5f740 commit 79c04ce

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

lib/net/ldap.rb

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1273,6 +1273,11 @@ def close
12731273
@conn = nil
12741274
end
12751275

1276+
# Internal: Reads and parses data from the configured connection.
1277+
#
1278+
# - syntax: the BER syntax to use to parse the read data with
1279+
#
1280+
# Returns basic BER objects.
12761281
def read(syntax = Net::LDAP::AsnSyntax)
12771282
instrument "read.net_ldap_connection", :syntax => syntax do |payload|
12781283
@conn.read_ber(syntax) do |id, content_length|
@@ -1283,6 +1288,12 @@ def read(syntax = Net::LDAP::AsnSyntax)
12831288
end
12841289
private :read
12851290

1291+
# Internal: Writes the given packet to the configured connection.
1292+
#
1293+
# - packet: the BER data packet to write on the socket.
1294+
#
1295+
# Returns the return value from writing to the connection, which in some
1296+
# cases is the Integer number of bytes written to the socket.
12861297
def write(packet)
12871298
instrument "write.net_ldap_connection", :packet => packet do
12881299
@conn.write(packet)

0 commit comments

Comments
 (0)