Skip to content

feat: expose asynchronous data channel send results - #281

Merged
devopvoid merged 2 commits into
devopvoid:mainfrom
SendableMetatype:feature/data-channel-send-completion
Sep 8, 2026
Merged

feat: expose asynchronous data channel send results#281
devopvoid merged 2 commits into
devopvoid:mainfrom
SendableMetatype:feature/data-channel-send-completion

Conversation

@SendableMetatype

Copy link
Copy Markdown
Contributor

sendAsync reports failures only in the log, so an application cannot learn that a message was rejected. This adds an overload that takes an RTCDataChannelSendObserver and calls it exactly once with the result of the native operation, including the case where libwebrtc discards a pending send during shutdown without invoking its completion. Success means the message was queued locally, not delivered. Exceptions thrown by the observer are cleared on the native thread so they cannot escape into libwebrtc. The guide gains a section describing the method and its threading rules.

@devopvoid
devopvoid merged commit 2cfc30b into devopvoid:main Sep 8, 2026
1 check passed
@SendableMetatype
SendableMetatype deleted the feature/data-channel-send-completion branch September 8, 2026 13:36
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