Networking Libraries

Networking libraries for distributed communication patterns using the scriptling.net namespace, and scriptling.mercure for publishing and subscribing through Mercure hubs.

Libraries

Library Description
scriptling.net.gossip Gossip protocol cluster membership and messaging
scriptling.net.multicast UDP multicast group messaging
scriptling.net.resolve DNS resolution for IP, SRV, and srv+http URLs
scriptling.net.unicast UDP and TCP point-to-point messaging
scriptling.net.websocket WebSocket client for connecting to WebSocket servers
scriptling.mercure Mercure hub client: publish updates and subscribe to topics over Server-Sent Events

Quick Start

import scriptling.net.websocket as ws

# Connect to a WebSocket server
conn = ws.connect("wss://echo.websocket.org", timeout=5)

# Send and receive a message
conn.send("hello")
message = conn.receive()
print(message)

conn.close()

See Also