Module: HTTPX::Plugins::Upgrade::ConnectionMethods

Defined in:
lib/httpx/plugins/upgrade.rb,
sig/plugins/upgrade.rbs

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#hijacked ⇒ boolish (readonly)

Returns the value of attribute hijacked.

Returns:

  • (boolish)


70
71
72
# File 'lib/httpx/plugins/upgrade.rb', line 70

def hijacked
  @hijacked
end

#upgrade_protocol ⇒ String? (readonly)

Returns the value of attribute upgrade_protocol.

Returns:

  • (String, nil)


70
71
72
# File 'lib/httpx/plugins/upgrade.rb', line 70

def upgrade_protocol
  @upgrade_protocol
end

Instance Method Details

#hijack_io ⇒ void

This method returns an undefined value.



78
79
80
81
82
83
# File 'lib/httpx/plugins/upgrade.rb', line 78

def hijack_io
  @hijacked = true

  # connection is taken away from selector and not given back to the pool.
  @current_session.deselect_connection(self, @current_selector, true)
end

#initialize ⇒ Object



72
73
74
75
76
# File 'lib/httpx/plugins/upgrade.rb', line 72

def initialize(*)
  super

  @upgrade_protocol = nil
end