Class: CelluloidPubsub::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/celluloid_pubsub/client_pubsub.rb

Overview

class used to make a new connection in order to subscribe or publish to a channel

Defined Under Namespace

Classes: PubSubWorker

Class Method Summary (collapse)

Class Method Details

+ (CelluloidPubsub::Client::PubSubWorker) connect(options = {}, &connect_blk)

method used to make a new connection to the webserver after the connection is opened it will execute the block that is passed as argument

Parameters:

  • options (Hash) (defaults to: {})

    the options that can be used to connect to webser and send additional data

  • connect_blk (Proc)

    Block that will execute after the connection is opened

Options Hash (options):

  • :actor (String)

    The actor that made the connection

  • :hostname (String)

    The hostname on which the webserver runs on

  • :port (String)

    The port on which the webserver runs on

  • :path (String)

    The request path that the webserver accepts

Returns:



192
193
194
# File 'lib/celluloid_pubsub/client_pubsub.rb', line 192

def self.connect(options = {}, &connect_blk)
  CelluloidPubsub::Client::PubSubWorker.new(options, &connect_blk)
end