onClose method
void
onClose(
- dynamic reason
Called upon transport close.
reason
reason
Implementation
void onClose(reason) {
destroy();
// `nsps` and `sockets` are cleaned up seamlessly
if (sockets.isNotEmpty) {
for (var socket in List.from(sockets)) {
socket.onClose(reason);
}
sockets.clear();
}
decoder.destroy(); // clean up decoder
}