Module: Rubarb::IncomingConnection
- Includes:
- RemoteCall
- Defined in:
- lib/rubarb/incoming_connection.rb
Instance Method Summary
collapse
Methods included from RemoteCall
#marshal_call, #unmarshal_call
Instance Method Details
#cancel_keep_alive ⇒ Object
29
30
31
|
# File 'lib/rubarb/incoming_connection.rb', line 29
def cancel_keep_alive
end
|
#receive_message(message) ⇒ Object
10
11
12
13
14
15
16
17
18
19
20
|
# File 'lib/rubarb/incoming_connection.rb', line 10
def receive_message(message)
id, method, args = unmarshal_call(message)
return unless method
responder = Responder.new(self, id)
begin
raise Rubarb::InsecureMethodCallError.new(method) if @insecure_methods.include?(method)
api.send(method, *[responder, *args])
rescue Exception => e
reply("0", e)
end
end
|
#reply(id, *args) ⇒ Object
22
23
24
|
# File 'lib/rubarb/incoming_connection.rb', line 22
def reply(id, *args)
send_message(marshal_call(args.unshift(id)))
end
|
#reset_keep_alive ⇒ Object
26
27
|
# File 'lib/rubarb/incoming_connection.rb', line 26
def reset_keep_alive
end
|