Skip to content

Commit

Permalink
removed useWebSocket flag and added unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
purnimavenkatasubbu committed Nov 18, 2024
1 parent a635041 commit 65f6141
Show file tree
Hide file tree
Showing 4 changed files with 725 additions and 365 deletions.
9 changes: 3 additions & 6 deletions packages/at_lookup/lib/src/at_lookup_impl.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import 'package:crypto/crypto.dart';
import 'package:crypton/crypton.dart';
import 'package:mutex/mutex.dart';


class AtLookupImpl implements AtLookUp {
final logger = AtSignLogger('AtLookup');

Expand Down Expand Up @@ -63,12 +62,10 @@ class AtLookupImpl implements AtLookUp {
SecondaryAddressFinder? secondaryAddressFinder,
SecureSocketConfig? secureSocketConfig,
Map<String, dynamic>? clientConfig,
bool useWebSocket = false}) // Add a flag for WebSocket or SecureSocket
AtLookupOutboundConnectionFactory? atSocketFactory})
{
// Determine the factory type based on the useWebSocket flag
atSocketFactory = useWebSocket
? AtLookupWebSocketFactory()
: AtLookupSecureSocketFactory() as AtLookupOutboundConnectionFactory;
// Default to secure socket factory
this.atSocketFactory = atSocketFactory ?? AtLookupSecureSocketFactory();
_currentAtSign = atSign;
_rootDomain = rootDomain;
_rootPort = rootPort;
Expand Down
Loading

0 comments on commit 65f6141

Please sign in to comment.