Class: EMRPC::LocalConnection::Channel

Inherits:
Object
  • Object
show all
Defined in:
lib/emrpc/evented_api/local_connection.rb

Overview

Helper class representing abstract connection channel.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(pid1, pid2, conn12 = nil) ⇒ Channel

Returns a new instance of Channel.



8
9
10
11
# File 'lib/emrpc/evented_api/local_connection.rb', line 8

def initialize(pid1, pid2, conn12 = nil)
  @conn21 = LocalConnection.new(pid2, pid1, self)
  @conn12 = conn12 || LocalConnection.new(pid1, pid2, self)
end

Instance Attribute Details

#conn12Object

Returns the value of attribute conn12.



7
8
9
# File 'lib/emrpc/evented_api/local_connection.rb', line 7

def conn12
  @conn12
end

#conn21Object

Returns the value of attribute conn21.



7
8
9
# File 'lib/emrpc/evented_api/local_connection.rb', line 7

def conn21
  @conn21
end

Instance Method Details

#connectionObject



16
17
18
# File 'lib/emrpc/evented_api/local_connection.rb', line 16

def connection
  @conn12
end

#unbindObject



12
13
14
15
# File 'lib/emrpc/evented_api/local_connection.rb', line 12

def unbind
  @conn12.unbind
  @conn21.unbind
end