Class: Tribe::EM::AmfSocket::ActorProxy

Inherits:
AmfSocket::AmfRpcConnection
  • Object
show all
Defined in:
lib/tribe_em_amfsocket/actor_proxy.rb

Instance Method Summary collapse

Instance Method Details

#close(after_writing = false) ⇒ Object



46
47
48
49
50
# File 'lib/tribe_em_amfsocket/actor_proxy.rb', line 46

def close(after_writing = false)
  ::EM.schedule { close_connection(after_writing) }

  return nil
end

#post_initObject



24
25
26
27
28
# File 'lib/tribe_em_amfsocket/actor_proxy.rb', line 24

def post_init
  super

  @actor.deliver_message!(:post_init, nil)
end

#receive_message(message) ⇒ Object



36
37
38
# File 'lib/tribe_em_amfsocket/actor_proxy.rb', line 36

def receive_message(message)
  @actor.deliver_message!(:receive_message, message)
end

#unbindObject



30
31
32
33
34
# File 'lib/tribe_em_amfsocket/actor_proxy.rb', line 30

def unbind
  super

  @actor.deliver_message!(:unbind, nil)
end

#write_message(command, params = {}) ⇒ Object



52
53
54
55
56
# File 'lib/tribe_em_amfsocket/actor_proxy.rb', line 52

def write_message(command, params = {})
  ::EM.schedule { send_message(command, params) }

  return nil
end