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 EnableDataChannelBlockWrite to SettingEngine #2968

Merged
merged 2 commits into from
Dec 16, 2024
Merged

Conversation

cnderrauber
Copy link
Member

The settingengine can enabled block write if
datachannel is detached, makes it working like
a normal net.Conn.

Description

Reference issue

Fixes #...

Copy link

codecov bot commented Dec 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.79%. Comparing base (6a3f355) to head (07084d1).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2968      +/-   ##
==========================================
+ Coverage   77.73%   77.79%   +0.05%     
==========================================
  Files          89       89              
  Lines       10521    10526       +5     
==========================================
+ Hits         8179     8189      +10     
+ Misses       1850     1845       -5     
  Partials      492      492              
Flag Coverage Δ
go 79.36% <100.00%> (+0.06%) ⬆️
wasm 63.45% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@cnderrauber
Copy link
Member Author

cnderrauber commented Dec 10, 2024

  • (*DataChannel).Detach: changed from func() (github.com/pion/datachannel.ReadWriteCloser, error) to func() (github.com/pion/datachannel.ReadWriteCloserDeadliner, error)

The API check complains compatibility issues but they should be ok for existed codes, any suggestion on this change? @Sean-Der

Copy link
Contributor

@boks1971 boks1971 left a comment

Choose a reason for hiding this comment

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

lgtm!

@Sean-Der
Copy link
Member

@cnderrauber Could we do DetachWithDeadline? We can return a datachannel.ReadWriteCloseDeadliner from Detach the extra method will just be ignored?

API break I believe could be a problem. Users could have code that returns a datachannel.ReadWriteCloser

The settingengine can enabled block write if
datachannel is detached, makes it working like
a normal net.Conn.
@cnderrauber cnderrauber merged commit 9cfda8b into master Dec 16, 2024
18 checks passed
@cnderrauber cnderrauber deleted the dc_nonblock_write branch December 16, 2024 04:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants