disconnect method
delayMs
: milliseconds to wait after destroying the socket
Implementation
void disconnect({int? delayMs}) async {
_socket.destroy();
if (delayMs != null) {
await Future.delayed(Duration(milliseconds: delayMs), () => null);
}
}