module Bones::RPC::Protocol::AdapterHelper
Private Class Methods
included(base)
click to toggle source
Extends the including class with ClassMethods
.
@param [Class] subclass the inheriting class
Calls superclass method
# File lib/bones/rpc/protocol/adapter_helper.rb, line 41 def included(base) super base.extend(ClassMethods) end
Public Instance Methods
receive_replies(connection)
click to toggle source
Default implementation for a message is to do nothing when receiving replies.
@example Receive replies.
message.receive_replies(connection)
@param [ Connection
] connection The connection.
@return [ nil ] nil.
@since 0.0.1
# File lib/bones/rpc/protocol/adapter_helper.rb, line 19 def receive_replies(connection); end
serialize(buffer, adapter)
click to toggle source
Serializes the message and all of its fields to a new buffer or to the provided buffer.
@example Serliaze the message.
message.serialize
@param [ String ] buffer A buffer to serialize to.
@return [ String ] The result of serliazing this message
@since 0.0.1
# File lib/bones/rpc/protocol/adapter_helper.rb, line 32 def serialize(buffer, adapter) Adapter.get(adapter).serialize(process, buffer) end