Skip to main content

Documentation Index

Fetch the complete documentation index at: https://abxbus.archivebox.io/llms.txt

Use this file to discover all available pages before exploring further.

SocketEventBridge uses a Unix socket path for both send and listen directions.

Constructor params

  • path: Unix socket path (absolute path recommended)
  • name: optional bridge label
from abxbus.bridges import SocketEventBridge

bridge = SocketEventBridge('/tmp/abxbus_events.sock', name='SocketBridge')

Setup with a bus

from abxbus import EventBus
from abxbus.bridges import SocketEventBridge

bus = EventBus('AppBus')
bridge = SocketEventBridge('/tmp/abxbus_events.sock')

bus.on('*', bridge.emit)
bridge.on('*', bus.emit)

Behavior

  • emit(...) writes newline-delimited event JSON frames to the Unix socket.
  • on(...) subscribes handlers on the inbound side and auto-starts the socket listener.
  • Incoming frames are decoded into events, reset, then emitted on the internal bus.
  • close() stops the socket server and tears down the internal bus.
  • TypeScript socket bridges require Node.js runtime support for Unix sockets.