Expose "SetReadDeadline" and "SetDeadline" from this package
mission-liao opened this issue · comments
Summary
- Expose
SetReadDeadline
fromReadStreamSRTP
andReadStreamSRTCP
. - Expose
SetWriteDeadline
fromWriteStreamSRTP
andWriteStreamSRTCP
Motivation
To make the packet I/O of pion/webrtc
cancelable without closing peer-connection, including RTP and RTCP packets.
Additional context
I've spent some time to trace this package, and below is an implementation plan. Please kindly correct me if it's wrong.
- expose
SetReadDeadline
forReadStreamSRTP
viaReadStreamSRTP.buffer
. - expose
SetReadDeadline
forReadStreamSRTCP
viaReadStreamSRTCP.buffer
. - expose
SetWriteDeadline
forWriteStreamSRTP
viasession.nextConn
. - expose
SetWriteDeadline
forWriteStreamSRTCP
viasession.nextConn
.
What I didn't investigate is the way to test the implementation, feel free to give me some advise/reference if any.
@Sean-Der would love to get your feedback and take over the implementation part.
@mission-liao I am 100% in support of this! This is an instant merge from me :)
Test wise I think it is ok to set a Timelimit on the test 5 seconds
and set a small ReadDeadline. If the test times out it will cause a fail.
Cool, would integrate this part to pion/webrtc
package later.