While we intend to keep this module as simple and stable as possible, we may need to add features or introduce breaking changes. This could happen at any time until we release this module as stable.
Experimental module, use at your own risk
This experimental API implements the browser's WebSocket API.
With some caveats:
- The binaryType is by default ArrayBuffer and setting it panics as k6 does not support Blob.
|WebSocket||Constructs a new WebSocket connection|
This example shows:
- How a single VU can run multiple WebSockets connections asynchronously
- How to use the timeout and interval functions to stop the connections after some period.