| Class | UnionStationHooks::MessageChannel |
| In: |
src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/message_channel.rb
|
| Parent: | Object |
This class allows reading and writing structured messages over I/O channels. This is the Ruby implementation of Passenger‘s src/cxx_supportlib/Utils/MessageIO.h; see that file for more information.
@private
| HEADER_SIZE | = | 2 |
| DELIMITER | = | "\0" |
| DELIMITER_NAME | = | 'null byte' |
| UINT16_PACK_FORMAT | = | 'n' |
| UINT32_PACK_FORMAT | = | 'N' |
| io | [RW] | The wrapped IO object. |
Read an array message from the underlying file descriptor. Returns the array message as an array, or nil when end-of-stream has been reached.
Might raise SystemCallError, IOError or SocketError when something goes wrong.
Send an array message, which consists of the given elements, over the underlying file descriptor. name is the first element in the message, and args are the other elements. These arguments will internally be converted to strings by calling to_s().
Might raise SystemCallError, IOError or SocketError when something goes wrong.
Send a scalar message over the underlying IO object.
Might raise SystemCallError, IOError or SocketError when something goes wrong.