Module: MessagePack::RPC::MessageReceiver
- Defined in:
- lib/msgpack/rpc/transport/base.rb
Instance Method Summary collapse
Instance Method Details
#on_message(msg, *ctx) ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/msgpack/rpc/transport/base.rb', line 23 def (msg, *ctx) case msg[0] when REQUEST on_request(msg[1], msg[2], msg[3], *ctx) when RESPONSE on_response(msg[1], msg[2], msg[3], *ctx) when NOTIFY on_notify(msg[1], msg[2], *ctx) else raise RPCError.new("unknown message type #{msg[0]}") end end |