Dart - websocket.close()
Closes a connection to a websocket
import 'package:nitric_sdk/nitric.dart';final socket = Nitric.websocket("socket");await socket.close(connectionId);
Parameters
- Name
connectionId
- Required
- Required
- Type
- String
- Description
The ID of the connection to be closed.
Examples
Close a connection to the websocket on message
import 'package:nitric_sdk/nitric.dart';final socket = Nitric.websocket("socket");await socket.close(connectionId);
Last updated on Oct 16, 2024