v3/examples/websocket-transport/assets/index.html
Custom IPC transport using WebSockets instead of HTTP fetch
Disconnected
âšī¸ Transport Info: This example uses a custom WebSocket transport running on ws://localhost:9099/wails/ws instead of the default HTTP fetch-based transport. All Wails generated bindings work identically!
The methods below use GreetService.Greet(), GreetService.Echo(), etc. from the generated bindings, proving that custom transports work seamlessly with Wails code generation.
Waiting for timer...
⨠Automatic Event Forwarding: The server emits a timer:tick event every second. Because the WebSocket transport implements EventTransport, these events are automatically forwarded to the frontend with zero manual wiring code!
Open
Click "Open" to test the binding...
Greet
Click "Greet" to test the binding...
đĄ Event Counter: 0 (Updates via WebSocket events)
Echo
Click "Echo" to test...
Add
Click "Add" to calculate...
Get Server Time Click to get current server time...