Module ecapnp_message

Message framing.

Copyright © 2013, Andreas Stenius

Authors: Andreas Stenius (kaos@astekk.se).

Description

Message framing.

Takes care of reading a framed message, getting the segments data out, and writing the message header with the segment table.

Data Types

continuation()

continuation() = term()

message()

message() = ecapnp:message()

object()

object() = ecapnp:object()

read_result()

read_result() = {ok, message(), Rest::binary()} | {cont, continuation()}

Function Index

read/1Parse segment table in the (unpacked, but otherwise framed) message.
read/2
read_file/1Read binary message from file.
write/1Write segment table for message and return it along with the segments data.

Function Details

read/1

read(Data::binary()) -> read_result()

Parse segment table in the (unpacked, but otherwise framed) message.

read/2

read(Data::binary(), Rest::continuation() | undefined) -> read_result()

read_file/1

read_file(Filename::string()) -> read_result()

Read binary message from file.

See also: read/1.

write/1

write(Object::object()) -> binary()

Write segment table for message and return it along with the segments data.

Any non-default object may be passed to this function.


Generated by EDoc, May 30 2014, 12:56:29.