Class: Cod::Service::Client
- Inherits:
-
Object
- Object
- Cod::Service::Client
show all
- Defined in:
- lib/cod/service.rb
Overview
Instance Method Summary
collapse
Constructor Details
#initialize(server_chan, answer_chan = nil) ⇒ Client
Returns a new instance of Client.
53
54
55
|
# File 'lib/cod/service.rb', line 53
def initialize(server_chan, answer_chan=nil)
@server_chan, @answer_chan = server_chan, answer_chan || server_chan
end
|
Instance Method Details
#call(rq) ⇒ Object
57
58
59
60
|
# File 'lib/cod/service.rb', line 57
def call(rq)
@server_chan.put [rq, @answer_chan]
@answer_chan.get
end
|
#close ⇒ Object
66
67
68
69
|
# File 'lib/cod/service.rb', line 66
def close
@server_chan.close
@answer_chan.close
end
|
#notify(rq) ⇒ Object
62
63
64
|
# File 'lib/cod/service.rb', line 62
def notify(rq)
@server_chan.put [rq, nil]
end
|