Class: Thin::Backends::SwiftiplyClient

Class Thin::Backends::SwiftiplyClient < Base

(in files lib/thin/backends/swiftiply_client.rb )

Backend to act as a Swiftiply client (swiftiply.swiftcore.org).

Methods

Public Class new(host, port, options={})

    # File lib/thin/backends/swiftiply_client.rb, line 9
 9:       def initialize(host, port, options={})
10:         @host = host
11:         @port = port.to_i
12:         @key  = options[:swiftiply].to_s
13:         super()
14:       end

Public Instance connect()

Connect the server

    # File lib/thin/backends/swiftiply_client.rb, line 17
17:       def connect
18:         EventMachine.connect(@host, @port, SwiftiplyConnection, &method(:initialize_connection))
19:       end

Public Instance disconnect()

Stops the server

    # File lib/thin/backends/swiftiply_client.rb, line 22
22:       def disconnect
23:         EventMachine.stop
24:       end

Public Instance to_s()

    # File lib/thin/backends/swiftiply_client.rb, line 26
26:       def to_s
27:         "#{@host}:#{@port} swiftiply"
28:       end