|
|
|
@ -34,14 +34,16 @@ class SignalRHelper {
|
|
|
|
required VoidCallback onConnecting,
|
|
|
|
required VoidCallback onConnecting,
|
|
|
|
}) async {
|
|
|
|
}) async {
|
|
|
|
logger.i("Connecting Signal R with: $deviceIp");
|
|
|
|
logger.i("Connecting Signal R with: $deviceIp");
|
|
|
|
final url = hubBaseURL + "?IPAddress=$deviceIp";
|
|
|
|
final url = "$hubBaseURL?IPAddress=$deviceIp";
|
|
|
|
// final url = hubBaseURL;
|
|
|
|
// final url = hubBaseURL;
|
|
|
|
connection = HubConnectionBuilder()
|
|
|
|
connection = HubConnectionBuilder()
|
|
|
|
.withUrl(
|
|
|
|
.withUrl(
|
|
|
|
url,
|
|
|
|
url,
|
|
|
|
HttpConnectionOptions(
|
|
|
|
HttpConnectionOptions(
|
|
|
|
client: IOClient(HttpClient()..badCertificateCallback = (x, y, z) => true),
|
|
|
|
client: IOClient(HttpClient()..badCertificateCallback = (x, y, z) => true),
|
|
|
|
// transport: HttpTransportType.webSockets,
|
|
|
|
|
|
|
|
|
|
|
|
//TODO: IT MUST BE WEB SOCKETS
|
|
|
|
|
|
|
|
transport: HttpTransportType.longPolling,
|
|
|
|
logging: (level, message) => log(message),
|
|
|
|
logging: (level, message) => log(message),
|
|
|
|
))
|
|
|
|
))
|
|
|
|
.withAutomaticReconnect()
|
|
|
|
.withAutomaticReconnect()
|
|
|
|
|