Class: MessagePack::RPC::TCPServerTransport::ServerSocket
- Inherits:
-
MessagePack::RPC::TCPTransport::BasicSocket
- Object
- Cool.io::TCPSocket
- MessagePack::RPC::TCPTransport::BasicSocket
- MessagePack::RPC::TCPServerTransport::ServerSocket
- Defined in:
- lib/msgpack/rpc/transport/tcp.rb
Instance Method Summary collapse
-
#initialize(io, server) ⇒ ServerSocket
constructor
A new instance of ServerSocket.
-
#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::TCPTransport::BasicSocket
Methods included from MessageReceiver
Constructor Details
#initialize(io, server) ⇒ ServerSocket
Returns a new instance of ServerSocket.
220 221 222 223 |
# File 'lib/msgpack/rpc/transport/tcp.rb', line 220 def initialize(io, server) super(io) @server = server end |
Instance Method Details
#on_notify(method, param) ⇒ Object
MessageReceiver interface
236 237 238 |
# File 'lib/msgpack/rpc/transport/tcp.rb', line 236 def on_notify(method, param) @server.on_notify(method, param) end |
#on_request(msgid, method, param) ⇒ Object
MessageReceiver interface
231 232 233 |
# File 'lib/msgpack/rpc/transport/tcp.rb', line 231 def on_request(msgid, method, param) @server.on_request(self, msgid, method, param) end |
#on_response(msgid, error, result) ⇒ Object
MessageReceiver interface
241 242 243 |
# File 'lib/msgpack/rpc/transport/tcp.rb', line 241 def on_response(msgid, error, result) raise Error.new("response message on server session") end |
#send_data(data) ⇒ Object
MessageSendable interface
226 227 228 |
# File 'lib/msgpack/rpc/transport/tcp.rb', line 226 def send_data(data) write data end |