Skip to content

feat: add asynchronous sendAsync to RTCDataChannel - #246

Open
SendableMetatype wants to merge 1 commit into
devopvoid:mainfrom
SendableMetatype:feature/send-async
Open

feat: add asynchronous sendAsync to RTCDataChannel#246
SendableMetatype wants to merge 1 commit into
devopvoid:mainfrom
SendableMetatype:feature/send-async

Conversation

@SendableMetatype

Copy link
Copy Markdown

send marshals to the signaling thread and blocks the caller until the engine has taken the payload, so applications pushing high message rates over many channels pay a synchronous round trip per message.

sendAsync forwards to the engine's asynchronous send path. The payload window (position to limit) is copied on the native side before the call returns, so the Java buffer can be reused immediately. Errors are reported asynchronously: queueing failures are logged natively, and fatal errors close the data channel, which the registered RTCDataChannelObserver sees as a state change. Existing send is unchanged.

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.

1 participant