This commit is contained in:
@@ -7,6 +7,13 @@ export async function serveOnSessionBus(daemon) {
|
|||||||
// its builtin imports use bare-* implementations where supported.
|
// its builtin imports use bare-* implementations where supported.
|
||||||
const { createRequire } = await import('node:module');
|
const { createRequire } = await import('node:module');
|
||||||
const require = createRequire(import.meta.url);
|
const require = createRequire(import.meta.url);
|
||||||
|
// dbus-next enables TCP_NODELAY on every transport. Bare's Unix-pipe
|
||||||
|
// transport exposes the Node-compatible method on the wrapper, but its
|
||||||
|
// underlying pipe does not implement the native socket operation. D-Bus is
|
||||||
|
// request/response traffic, so disabling this optional optimization keeps
|
||||||
|
// the transport functional without changing message semantics.
|
||||||
|
const net = require('node:net', { with: { imports: 'bare-node-runtime/imports' } });
|
||||||
|
if (net.Socket?.prototype) net.Socket.prototype.setNoDelay = function setNoDelay() { return this; };
|
||||||
const dbus = require('dbus-next', { with: { imports: 'bare-node-runtime/imports' } });
|
const dbus = require('dbus-next', { with: { imports: 'bare-node-runtime/imports' } });
|
||||||
const { Interface } = dbus.interface;
|
const { Interface } = dbus.interface;
|
||||||
class Session extends Interface {
|
class Session extends Interface {
|
||||||
|
|||||||
Reference in New Issue
Block a user