Project

General

Profile

« Previous | Next » 

Revision 2cfb7e86

Added by Marc Dequènes over 13 years ago

  • ID 2cfb7e86b2b8c0c0653c804fc469601bfd51ace8

[evol] added a user event queue for NOTIFY EVENT received

View differences:

lib/cyborghood/cyborg/protocol.rb
VERSION = "0.1"
CAPABILITIES = []
attr_reader :system_notification
attr_reader :system_notification, :user_notification
@@request_callback = proc do |result|
protocol = result[:reply_message].conv_thread.conversation.protocol
......
@action_followup = {}
@system_notification = EventMachine::Channel.new
@user_notification = EventMachine::Channel.new
end
def negociation_ok?
......
end
end
# TODO: what is the peer close a thread i have opened ?
# TODO: what if the peer close a thread i have opened ?
# send error to all actions ?
def receive_notify_thread_closed(message)
message.conv_thread.close(false)
end
def receive_notify_event(message)
# TODO
@user_notification << {
:from => message.conversation.peer_id,
:topic => message.action_parameters[:name],
:info => message.action_parameters[:info]
}
end
def receive_reply_ack(message)
# TODO
# TODO: cancel timeout (which does not exist yet)
end
def receive_reply_decline(message)

Also available in: Unified diff