Class: MessagePack::RPC::UNIXTransport::BasicSocket
- Inherits:
-
Cool.io::UNIXSocket
- Object
- Cool.io::UNIXSocket
- MessagePack::RPC::UNIXTransport::BasicSocket
- Includes:
- MessageReceiver
- Defined in:
- lib/msgpack/rpc/transport/unix.rb
Direct Known Subclasses
MessagePack::RPC::UNIXClientTransport::ClientSocket, MessagePack::RPC::UNIXServerTransport::ServerSocket
Instance Method Summary collapse
-
#initialize(io) ⇒ BasicSocket
constructor
A new instance of BasicSocket.
-
#on_read(data) ⇒ Object
from Cool.io::UNIXSocket.
-
#on_readable ⇒ Object
from Cool.io::TCPSocket.
Methods included from MessageReceiver
Constructor Details
#initialize(io) ⇒ BasicSocket
Returns a new instance of BasicSocket.
32 33 34 35 |
# File 'lib/msgpack/rpc/transport/unix.rb', line 32 def initialize(io) super(io) @pac = MessagePack::Unpacker.new end |
Instance Method Details
#on_read(data) ⇒ Object
from Cool.io::UNIXSocket
47 48 49 50 51 |
# File 'lib/msgpack/rpc/transport/unix.rb', line 47 def on_read(data) @pac.feed_each(data) {|obj| (obj) } end |
#on_readable ⇒ Object
from Cool.io::TCPSocket
38 39 40 41 42 43 44 |
# File 'lib/msgpack/rpc/transport/unix.rb', line 38 def on_readable super rescue # FIXME send Connection Close message # FIXME log close end |