Thin::Backends::SwiftiplyClient

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

Attributes

host[RW]
key[RW]
port[RW]

Public Class Methods

new(host, port, options={}) click to toggle source
# File lib/thin/backends/swiftiply_client.rb, line 9
def initialize(host, port, options={})
  @host = host
  @port = port.to_i
  @key  = options[:swiftiply].to_s
  super()
end

Public Instance Methods

connect() click to toggle source

Connect the server

# File lib/thin/backends/swiftiply_client.rb, line 17
def connect
  EventMachine.connect(@host, @port, SwiftiplyConnection, &method(:initialize_connection))
end
disconnect() click to toggle source

Stops the server

# File lib/thin/backends/swiftiply_client.rb, line 22
def disconnect
  EventMachine.stop
end
to_s() click to toggle source
# File lib/thin/backends/swiftiply_client.rb, line 26
def to_s
  "#{@host}:#{@port} swiftiply"
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.