Class: MessagePack::RPC::UNIXClientTransport::ClientSocket
- Inherits:
-
MessagePack::RPC::UNIXTransport::BasicSocket
- Object
- Cool.io::UNIXSocket
- MessagePack::RPC::UNIXTransport::BasicSocket
- MessagePack::RPC::UNIXClientTransport::ClientSocket
- Defined in:
- lib/msgpack/rpc/transport/unix.rb
Instance Method Summary collapse
-
#initialize(io, session) ⇒ ClientSocket
constructor
A new instance of ClientSocket.
-
#on_notify(method, param) ⇒ Object
MessageReceiver interface.
-
#on_request(msgid, method, param) ⇒ Object
MessageReceiver interface.
-
#on_response(msgid, error, result) ⇒ Object
MessageReceiver interface.
-
#send_data(data) ⇒ Object
MessageSendable interface.
Methods inherited from MessagePack::RPC::UNIXTransport::BasicSocket
Methods included from MessageReceiver
Constructor Details
#initialize(io, session) ⇒ ClientSocket
Returns a new instance of ClientSocket.
89 90 91 92 |
# File 'lib/msgpack/rpc/transport/unix.rb', line 89 def initialize(io, session) super(io) @s = session end |
Instance Method Details
#on_notify(method, param) ⇒ Object
MessageReceiver interface
105 106 107 |
# File 'lib/msgpack/rpc/transport/unix.rb', line 105 def on_notify(method, param) raise Error.new("notify message on client session") end |
#on_request(msgid, method, param) ⇒ Object
MessageReceiver interface
100 101 102 |
# File 'lib/msgpack/rpc/transport/unix.rb', line 100 def on_request(msgid, method, param) raise Error.new("request message on client session") end |
#on_response(msgid, error, result) ⇒ Object
MessageReceiver interface
110 111 112 |
# File 'lib/msgpack/rpc/transport/unix.rb', line 110 def on_response(msgid, error, result) @s.on_response(self, msgid, error, result) end |
#send_data(data) ⇒ Object
MessageSendable interface
95 96 97 |
# File 'lib/msgpack/rpc/transport/unix.rb', line 95 def send_data(data) write data end |