No results for

Powered byAlgolia

Socket.close()

suggest edits

Close the WebSocket connection.

Example

import ws from 'k6/ws';
export default function () {
var url = 'ws://echo.websocket.org';
var response = ws.connect(url, null, function (socket) {
socket.on('open', function () {
socket.close();
});
});
}