Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add basic WAMP client #4

Merged
merged 10 commits into from
May 2, 2024
Merged

Conversation

muzzammilshahid
Copy link
Member

No description provided.

@muzzammilshahid muzzammilshahid marked this pull request as draft April 27, 2024 13:30
@muzzammilshahid muzzammilshahid requested a review from om26er April 27, 2024 13:30
@muzzammilshahid muzzammilshahid marked this pull request as ready for review April 29, 2024 11:08
@muzzammilshahid muzzammilshahid force-pushed the client branch 2 times, most recently from 9d08cae to 071fe81 Compare April 30, 2024 13:32
Copy link
Member

@om26er om26er left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TL;DR we need new types Result, Invocation and Event. They wont include request id etc

Future.microtask(() async {
while (true) {
await _baseSession.receive().then(
(value) => _processIncomingMessage(_wampSession.receive(Uint8List.fromList((value as String).codeUnits))),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might want to assign values first and use them instead of chaining them


final Map<int, Completer<Result>> _callRequests = {};
final Map<int, RegisterRequest> _registerRequests = {};
final Map<int, Yield Function(Invocation)> _registrations = {};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as user api is concerned this should have a new class Result AND Invocation defined in types. So instead of Yield we will use Result. NOTE Result wont be a wamp message type but rather a normal class. See wamp.py

@muzzammilshahid muzzammilshahid merged commit 3915d82 into xconnio:main May 2, 2024
1 check passed
@muzzammilshahid muzzammilshahid deleted the client branch May 2, 2024 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants