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

Enhancements for dtls.SCTPConn #253

Merged
merged 1 commit into from
Oct 19, 2023
Merged

Enhancements for dtls.SCTPConn #253

merged 1 commit into from
Oct 19, 2023

Conversation

rod-hynes
Copy link
Contributor

dtls.SCTPConn is the net.Conn returned from gotapdance.Dial for the Conjure protocol with the DTLS transport. Callers may expect that net.Conn to behave as a TCP-like byte stream, and not an SCTP message stream, and these changes accomodate that. These changes should also be appropriate for use of dtls.SCTPConn on the station side.

  • Skip 0-byte writes
  • Buffer reads, allowing the caller to read smaller amounts of bytes without hitting the "short buffer" error
  • Add write flow control to avoid possibly unbounded outbound packet buffering

dtls.SCTPConn is the net.Conn returned from gotapdance.Dial for the Conjure
protocol with the DTLS transport. Callers may expect that net.Conn to behave
as a TCP-like byte stream, and not an SCTP message stream, and these changes
accomodate that. These changes should also be appropriate for use of
dtls.SCTPConn on the station side.

- Skip 0-byte writes
- Buffer reads, allowing the caller to read smaller amounts of bytes without
  hitting the "short buffer" error
- Add write flow control to avoid possibly unbounded outbound packet buffering
@rod-hynes rod-hynes requested a review from mingyech October 18, 2023 17:11
Copy link
Member

@mingyech mingyech left a comment

Choose a reason for hiding this comment

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

This LGTM and works well, thanks for the addition!

@jmwample jmwample merged commit d2f9918 into refraction-networking:master Oct 19, 2023
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.

3 participants