Skip to content

Expose low-level api #20

@acrisci

Description

@acrisci

A low-level api would allow clients to send and receive arbitrary messages on the bus. This api would be needed for implementing dbus-send or dbus-monitor with this library.

let serial = bus.serial();
let msg = {
  type: METHOD_CALL,
  serial: serial,
  interface: 'org.test.interface',
  destination: 'org.test.name',
  member: 'SomeMethod',
  signature: 's',
  body: 'hello world'
};

bus.sendMessage(msg);

bus.on('message', (msg) => {
  if (msg.replySerial === serial) {
    // handle reply
  }
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions