Class: Mutant::Parallel::Connection::Frame Private
- Inherits:
-
Object
- Object
- Mutant::Parallel::Connection::Frame
- Defined in:
- lib/mutant/parallel/connection.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
- #receive_value ⇒ Object private
- #send_value(body) ⇒ Object private
Instance Method Details
#receive_value ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
132 |
# File 'lib/mutant/parallel/connection.rb', line 132 def receive_value = read(Util.one(read(HEADER_SIZE).unpack(HEADER_FORMAT))) |
#send_value(body) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
134 135 136 137 138 139 140 141 142 |
# File 'lib/mutant/parallel/connection.rb', line 134 def send_value(body) bytesize = body.bytesize fail Error, 'message to big' if bytesize > MAX_BYTES io.binmode io.write([bytesize].pack(HEADER_FORMAT)) io.write(body) end |