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

UTP-protocol-stream #450

Merged
merged 4 commits into from
Sep 3, 2023
Merged

UTP-protocol-stream #450

merged 4 commits into from
Sep 3, 2023

Conversation

ScottyPoi
Copy link
Collaborator

uTP streams end by emitting a "Stream" event with the compiled content.

While using only 1 network, this was sufficient.

However, if more than one network is active, the individual subprotocols will each be listening for this Stream event, and attempt to process / store any content streamed from uTP.

This PR fixes the issue by changing the Stream event. instead of Stream, uTP will emit the protocol id as the event name.

Each subprotocol will listen only for uTP events with its own protocol id.

Note that to do this, the uTP listener setup was moved from the abstract BaseProtocol class to the constructors of the individual subprotocols, and each additional sub protocol will need to include this in its constructor.

Copy link
Collaborator

@acolytec3 acolytec3 left a comment

Choose a reason for hiding this comment

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

lgtm

@acolytec3 acolytec3 merged commit 562a5b5 into master Sep 3, 2023
3 checks passed
@ScottyPoi ScottyPoi deleted the uTP-protocol-stream branch September 4, 2023 23:25
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