module SimpleRPC::SocketProtocol::Stream
Send objects by streaming them through a socket using a serialiser such as Marshal.
Fast and with low memory requirements, but is inherently unsafe (arbitrary code execution) and doesn’t work with some serialisers.
SimpleRPC
uses this library for calls, and uses SocketProtocol::Simple
for auth challenges (since it is safer)
Public Class Methods
recv(s, serialiser)
click to toggle source
Recieve using a serialiser reading from the socket
# File lib/simplerpc/socket_protocol.rb, line 46 def self.recv(s, serialiser) return serialiser.load(s) end
send(s, obj, serialiser)
click to toggle source
Send using a serialiser writing through the socket
# File lib/simplerpc/socket_protocol.rb, line 41 def self.send(s, obj, serialiser) return serialiser.dump(obj, s) end