[][src]Function skyway_webrtc_gateway_api::data::close_data_socket

pub async fn close_data_socket<'_>(data_id: &'_ DataId) -> Result<(), Error>

This function let a WebRTC Gateway close a socket to receive media which will be redirected to neighbour peer.

Examples

use skyway_webrtc_gateway_api::data::close_data_socket;
use skyway_webrtc_gateway_api::prelude::DataId;

async fn example() {
    let data_id = DataId::new("da-example");
    let result = close_data_socket(&data_id).await;
}