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
when initiator can send message via DataChannel. Example 22 #240
Comments
FYI - you can construct the DataChannel before SctpTransport.start is called. Data sent before start is called should be buffered until SctpTransport is started and underlying dtls is established. |
Report party received |
I will add a comment to make it clear that data cannot be sent until sctp.start() is called. |
In webrtc 1.0 is says |
As a clarification, proposal is to add the following text (contained in WebRTC 1.0 Section 6.2.3) to the ORTC specification Section 11.3.2: The send() method is overloaded to handle different data argument types. When any version of the method is called, the user agent must run the following steps: Let channel be the RTCDataChannel object on which data is to be sent. If channel.readyState attribute is connecting, throw an InvalidStateError exception and abort these steps. Execute the sub step that corresponds to the type of the methods argument: string object: Let data be the result of converting the argument object to a sequence of Unicode characters and increase the bufferedAmount attribute by the number of bytes needed to express data as UTF-8. Blob object: Let data be the raw data represented by the Blob object and increase the bufferedAmount attribute by the size of data, in bytes. ArrayBuffer object: Let data be the data stored in the buffer described by the ArrayBuffer object and increase the bufferedAmount attribute by the length of the ArrayBuffer in bytes. ArrayBufferView object: Let data be the data stored in the section of the buffer described by the ArrayBuffer object that the ArrayBufferView object references and increase the bufferedAmount attribute by the length of the ArrayBufferView in bytes. If channel's underlying data transport is not established yet, or if the closing procedure has started, then abort these steps. Attempt to send data on channel's underlying data transport; if the data cannot be sent, e.g. because it would need to be buffered but the buffer is full, the user agent must abruptly close channel's underlying data transport with an error. |
in Example 22
in initiate(), sends message to channel before received remote sctp capabilities.
I think it's better to send message after channel has connected.
is that correct ?
or receive RTCDataChannel from ondatachannel event in initiate too ?
The text was updated successfully, but these errors were encountered: