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

Refactor Yamux flags #338

Merged
merged 15 commits into from
Oct 11, 2023
Merged

Conversation

Nashatyrev
Copy link
Collaborator

@Nashatyrev Nashatyrev commented Oct 10, 2023

(based atop of #330)

  • Convert YamuxType to enum: e088393
  • Refactor YamuxFlags: convert them to Set of enum values. While the Yamux spec doesn't seem to allow a flags bitmask with more than one flag set it looks better to treat that explicitly as a 'set of flags': e28efd5

@Nashatyrev Nashatyrev marked this pull request as ready for review October 10, 2023 12:49
Copy link
Collaborator

@StefanBratanov StefanBratanov left a comment

Choose a reason for hiding this comment

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

LGTM with a nit

@@ -9,17 +8,15 @@ import io.netty.buffer.Unpooled
/**
* Contains the fields that comprise a yamux frame.
* @param id the ID of the stream.
* @param flags the flags value for this frame.
* @param flag the flag for this frame.
Copy link
Collaborator

Choose a reason for hiding this comment

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

should be flags right?

# Conflicts:
#	libp2p/src/main/kotlin/io/libp2p/mux/yamux/YamuxHandler.kt
#	libp2p/src/test/kotlin/io/libp2p/mux/yamux/YamuxHandlerTest.kt
@Nashatyrev Nashatyrev enabled auto-merge (squash) October 11, 2023 12:50
@Nashatyrev Nashatyrev merged commit e843836 into libp2p:develop Oct 11, 2023
2 checks passed
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