Set a custom transport for all Wails runtime calls. This allows you to replace the default HTTP fetch transport with WebSockets, custom protocols, or any other mechanism.
Your custom transport implementation
import { setTransport } from '/wails/runtime.js';const wsTransport = { call: async (objectID, method, windowName, args) => { // Your WebSocket implementation }};setTransport(wsTransport); Copy
import { setTransport } from '/wails/runtime.js';const wsTransport = { call: async (objectID, method, windowName, args) => { // Your WebSocket implementation }};setTransport(wsTransport);
Set a custom transport for all Wails runtime calls. This allows you to replace the default HTTP fetch transport with WebSockets, custom protocols, or any other mechanism.