Skip to content
instance method

Net::HTTP#ipaddr=

(::String? ipaddr) -> ::String?
ipaddr=(addr)

Sets the IP address for the connection:

Example
http = Net::HTTP.new(hostname)
http.ipaddr # => nil
http.ipaddr = '172.67.155.76'
http.ipaddr # => "172.67.155.76"

The IP address may not be set if the session has been started.

See also #ipaddr #lock #inspect #max_retries= also in 4.1 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0