Class: ROM::LDAP::Socket Private

Inherits:
Object
  • Object
show all
Extended by:
Initializer
Defined in:
lib/rom/ldap/socket.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Builds either TCP or UNIX.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#bufferedBoolean (readonly)

Returns default: true.

Returns:

  • (Boolean)

    default: true



81
# File 'lib/rom/ldap/socket.rb', line 81

option :buffered, type: Types::Strict::Bool, reader: :private, default: -> { true }

#hostInteger (readonly)

Returns:

  • (Integer)


42
# File 'lib/rom/ldap/socket.rb', line 42

option :host, type: Types::Strict::String, reader: :private, optional: true

#pathString (readonly)

Returns:

  • (String)


36
# File 'lib/rom/ldap/socket.rb', line 36

option :path, type: Types::Strict::String, reader: :private, optional: true

#retry_countBoolean (readonly)

Returns default: true.

Returns:

  • (Boolean)

    default: true



69
# File 'lib/rom/ldap/socket.rb', line 69

option :retry_count, type: Types::Strict::Integer, reader: :private, default: -> { 3 }

#write_timeoutInteger (readonly)

Returns default: 10.

Returns:

  • (Integer)

    default: 10



63
# File 'lib/rom/ldap/socket.rb', line 63

option :write_timeout, type: Types::Strict::Integer, reader: :private, default: -> { 10 }

Instance Method Details

#call::Socket, ::OpenSSL::SSL::SSLSocket

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (::Socket, ::OpenSSL::SSL::SSLSocket)


85
86
87
88
89
90
91
92
# File 'lib/rom/ldap/socket.rb', line 85

def call
  socket.do_not_reverse_lookup = true
  socket.sync = buffered
  socket.setsockopt(:SOCKET, :KEEPALIVE, keep_alive)
  socket.setsockopt(:TCP, :NODELAY, buffered) unless path

  connect!
end