Class: Fenris::ConsumerLocal

Inherits:
Connection
  • Object
show all
Defined in:
lib/fenris/connection.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Connection

#initialize, #log, mkbinding, #proxy, #proxy_target_unbound, #push, #receive_data, #ssl_handshake_completed, #ssl_verify_peer, #unbind

Constructor Details

This class inherits a constructor from Fenris::Connection

Class Method Details

.begin(client, provider_binding, provider_name, consumer_binding) ⇒ Object



101
102
103
104
105
106
# File 'lib/fenris/connection.rb', line 101

def self.begin(client, provider_binding, provider_name, consumer_binding)
  local_em = mkbinding(:start_server, consumer_binding)
  provider_em = mkbinding(:connect, provider_binding)
  client.log consumer_binding.inspect
  EventMachine::__send__ *local_em, self, client, :peer_name => provider_name, :peer_binding => provider_em, :binding => local_em
end

Instance Method Details

#post_initObject



108
109
110
# File 'lib/fenris/connection.rb', line 108

def post_init
  EventMachine::__send__ *@peer_binding, ConsumerProvider, @client, :peer_name => @peer_name, :peer => self, :binding => @peer_binding
end