mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Allow sending strings through data channels
This commit is contained in:
parent
82260a9d2b
commit
2c5fc3b3c8
1 changed files with 5 additions and 1 deletions
|
@ -274,7 +274,11 @@ impl RTCDataChannelMethods for RTCDataChannel {
|
|||
// fn SetBinaryType(&self, value: DOMString) -> ();
|
||||
|
||||
// https://www.w3.org/TR/webrtc/#dom-rtcdatachannel-send
|
||||
fn Send(&self, data: USVString) -> () {}
|
||||
fn Send(&self, data: USVString) -> () {
|
||||
if let Err(error) = self.channel.send(&data.0) {
|
||||
warn!("Could not send data channel message. Error: {:?}", error);
|
||||
}
|
||||
}
|
||||
|
||||
// https://www.w3.org/TR/webrtc/#dom-rtcdatachannel-send!overload-1
|
||||
fn Send_(&self, data: &Blob) -> () {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue