module OBus_wire:sig
..end
exception Data_error of string
Possible reasons are: the message is too big or contains too big
arrays.
exception Protocol_error of string
Possible reasons are:
val read_message : Lwt_io.input_channel -> OBus_message.t Lwt.t
read_message ic
deserializes a message from a channel. It
fails if the message contains file descriptors.val write_message : Lwt_io.output_channel ->
?byte_order:Lwt_io.byte_order -> OBus_message.t -> unit Lwt.t
write_message oc ?byte_order message
serializes a message to a
channel. It fails if the message contains file descriptors.val message_of_string : string -> Unix.file_descr array -> OBus_message.t
message_of_string buf fds
returns a message from a
string. fds
is used to resolv file descriptors the message may
contains.val string_of_message : ?byte_order:Lwt_io.byte_order ->
OBus_message.t -> string * Unix.file_descr array
type
reader
val reader : Lwt_unix.file_descr -> reader
reader unix_socket
creates a reader from a unix socketval read_message_with_fds : reader -> OBus_message.t Lwt.t
val close_reader : reader -> unit Lwt.t
close_reader reader
closes the given reader.
Note: this does not close the underlying file descriptor.
type
writer
val writer : Lwt_unix.file_descr -> writer
writer unix_socket
creates a writer from a unix socketval write_message_with_fds : writer ->
?byte_order:Lwt_io.byte_order -> OBus_message.t -> unit Lwt.t
val close_writer : writer -> unit Lwt.t
close_writer writer
closes the given writer.
Note: this does not close the underlying file descriptor.