WebSocket gateway URL and unit ID.
Callback functions that handle incoming Modbus requests (same ServerHandlers shape as the native TCP/serial servers).
A layer that binds the server and runs its request loop within the layer scope. Binding errors fail with ModbusError; loop errors are logged.
A scoped Layer that starts a browser Modbus server proxied over a WebSocket gateway (experimental upstream surface — browsers can't accept raw TCP connections, so this binds via
modbus-gatewayor an equivalent WS-to-TCP proxy).Unlike the native tcpServerLayer, the WASM server does not start serving on
bind()— it requires an explicit, continuously-awaitedserve()call to drive its request loop. This layer forks that call into the scope in the background so the returnedLayerbehaves the same as the native one from the consumer's perspective (no extra step needed).