Class: Thin::SwiftiplyConnection

Inherits:
Connection
  • Object
show all
Defined in:
lib/thin/backends/swiftiply_client.rb

Instance Method Summary collapse

Instance Method Details

#connection_completedObject



33
34
35
# File 'lib/thin/backends/swiftiply_client.rb', line 33

def connection_completed
  send_data swiftiply_handshake(@backend.key)
end

#persistent?Boolean

Returns:

  • (Boolean)


37
38
39
# File 'lib/thin/backends/swiftiply_client.rb', line 37

def persistent?
  true
end

#unbindObject



41
42
43
44
# File 'lib/thin/backends/swiftiply_client.rb', line 41

def unbind
  super
  EventMachine.add_timer(rand(2)) { reconnect(@backend.host, @backend.port) } if @backend.running?
end