fix(example): Comform examples to the new TCPSocketWrapper constructor
This commit is contained in:
parent
93e9d6ca22
commit
f287d501ab
@ -3,6 +3,8 @@ import 'package:moxxmpp/moxxmpp.dart';
|
|||||||
import 'package:moxxmpp_socket_tcp/moxxmpp_socket_tcp.dart';
|
import 'package:moxxmpp_socket_tcp/moxxmpp_socket_tcp.dart';
|
||||||
|
|
||||||
class TestingTCPSocketWrapper extends TCPSocketWrapper {
|
class TestingTCPSocketWrapper extends TCPSocketWrapper {
|
||||||
|
TestingTCPSocketWrapper() : super(true);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool onBadCertificate(dynamic certificate, String domain) {
|
bool onBadCertificate(dynamic certificate, String domain) {
|
||||||
return true;
|
return true;
|
||||||
|
@ -30,7 +30,7 @@ void main(List<String> args) async {
|
|||||||
TestingReconnectionPolicy(),
|
TestingReconnectionPolicy(),
|
||||||
AlwaysConnectedConnectivityManager(),
|
AlwaysConnectedConnectivityManager(),
|
||||||
ClientToServerNegotiator(),
|
ClientToServerNegotiator(),
|
||||||
ExampleTCPSocketWrapper(parser.srvRecord),
|
ExampleTCPSocketWrapper(parser.srvRecord, true),
|
||||||
)..connectionSettings = parser.connectionSettings;
|
)..connectionSettings = parser.connectionSettings;
|
||||||
|
|
||||||
// Generate OMEMO data
|
// Generate OMEMO data
|
||||||
|
@ -3,7 +3,7 @@ import 'package:moxxmpp_socket_tcp/moxxmpp_socket_tcp.dart';
|
|||||||
/// A simple socket for examples that allows injection of SRV records (since
|
/// A simple socket for examples that allows injection of SRV records (since
|
||||||
/// we cannot use moxdns here).
|
/// we cannot use moxdns here).
|
||||||
class ExampleTCPSocketWrapper extends TCPSocketWrapper {
|
class ExampleTCPSocketWrapper extends TCPSocketWrapper {
|
||||||
ExampleTCPSocketWrapper(this.srvRecord);
|
ExampleTCPSocketWrapper(this.srvRecord, bool logData) : super(logData);
|
||||||
|
|
||||||
/// A potential SRV record to inject for testing.
|
/// A potential SRV record to inject for testing.
|
||||||
final MoxSrvRecord? srvRecord;
|
final MoxSrvRecord? srvRecord;
|
||||||
|
Loading…
Reference in New Issue
Block a user