package obus
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
Pure Ocaml implementation of the D-Bus protocol
Install
dune-project
Dependency
Authors
Maintainers
Sources
obus-1.2.5.tar.gz
md5=81eb1034c6ef4421a2368a9b352199de
sha512=4b540497188a7d78f4f14f94c6b7fdff47dd06436a34e650ff378dd77bb3e2acb7afd45cd72daf4ddba06e732e9944d560c2882dc37862f1b1f1bb6df37e6205
doc/obus/OBus_transport/index.html
Module OBus_transportSource
Low-level transporting of messages
Type of message transport
recv tr receives one message from the given transport
send tr msg sends msg over the transport tr.
Returns the capabilities of the transport
Source
val make :
?switch:Lwt_switch.t ->
recv:(unit -> OBus_message.t Lwt.t) ->
send:(OBus_message.t -> unit Lwt.t) ->
?capabilities:OBus_auth.capability list ->
shutdown:(unit -> unit Lwt.t) ->
unit ->
tmake ?switch ~recv ~send ~support_unxi_fd ~shutdown () creates a new transport from the given functions.
Notes:
- message reading/writing are serialized by obus, so there is no need to handle concurrent access to transport
Loopback transport, each message sent is received on the same transport
Source
val socket :
?switch:Lwt_switch.t ->
?capabilities:OBus_auth.capability list ->
Lwt_unix.file_descr ->
tsocket ?switch ?capabilities socket creates a socket transport.
Source
val of_addresses :
?switch:Lwt_switch.t ->
?capabilities:OBus_auth.capability list ->
?mechanisms:OBus_auth.Client.mechanism list ->
OBus_address.t list ->
(OBus_address.guid * t) Lwt.tof_addresses ?switch ?capabilities ?mechanisms addresses tries to:
- connect to the server using one of the given given addresses,
- authenticate itself to the server using
mechanisms, which defaults toOBus_auth.Client.default_mechanisms, - negotiates
capabilities, which defaults toOBus_auth.capabilities
If all succeeded, it returns the server address guid and the newly created transport, which is ready to send and receive messages.
Note about errors:
- if one of the addresses is not valid, or
addresses = [], it raisesInvalid_argument, - if all connections failed, it raises the exception raised by the try on first address, which is either a
Failureor aUnix.Unix_error - if the authentication failed, a
OBus_auth.Auth_erroris raised
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>