generateConnectionUrl static method
Generate a connection URL for sharing.
Implementation
static String generateConnectionUrl({
required String host,
required int port,
String? token,
bool secure = false,
}) {
final scheme = secure ? 'wss' : 'ws';
final url = '$scheme://$host:$port/ws';
if (token != null) {
return '$url?token=$token';
}
return url;
}