virtualx-engine/modules/webrtc/doc_classes/WebRTCDataChannel.xml
Fabio Alessandrelli 729b1e9941 WebRTC refactor. Data channels, STUN/TURN support.
A big refactor to the WebRTC module. API is now considered quite stable.

Highlights:

- Renamed `WebRTCPeer` to `WebRTCPeerConnection`.
- `WebRTCPeerConnection` no longer act as `PacketPeer`, it only handle the connection itself (a bit like `TCP_Server`)
- Added new `WebRTCDataChannel` class which inherits from `PacketPeer` to handle data transfer.
- Add `WebRTCPeerConnection.initialize` method to create a new connection with the desired configuration provided as dictionary ([see MDN docs](https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/RTCPeerConnection#RTCConfiguration_dictionary)).
- Add `WebRTCPeerConnection.create_data_channel` method to create a data channel for the given connection. The connection must be in `STATE_NEW` as specified by the standard ([see MDN docs for options](https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/createDataChannel#RTCDataChannelInit_dictionary)).
- Add a `data_channel_received` signal to `WebRTCPeerConnection` for in-band (not negotiated) channels.
- Renamed `WebRTCPeerConnection` `offer_created` signal to `session_description_created`.
- Renamed `WebRTCPeerConnection` `new_ice_candidate` signal to `ice_candidate_created`
2019-05-16 11:21:20 +02:00

95 lines
2.3 KiB
XML

<?xml version="1.0" encoding="UTF-8" ?>
<class name="WebRTCDataChannel" inherits="PacketPeer" category="Core" version="3.2">
<brief_description>
</brief_description>
<description>
</description>
<tutorials>
</tutorials>
<methods>
<method name="close">
<return type="void">
</return>
<description>
</description>
</method>
<method name="get_id" qualifiers="const">
<return type="int">
</return>
<description>
</description>
</method>
<method name="get_label" qualifiers="const">
<return type="String">
</return>
<description>
</description>
</method>
<method name="get_max_packet_life_time" qualifiers="const">
<return type="int">
</return>
<description>
</description>
</method>
<method name="get_max_retransmits" qualifiers="const">
<return type="int">
</return>
<description>
</description>
</method>
<method name="get_protocol" qualifiers="const">
<return type="String">
</return>
<description>
</description>
</method>
<method name="get_ready_state" qualifiers="const">
<return type="int" enum="WebRTCDataChannel.ChannelState">
</return>
<description>
</description>
</method>
<method name="is_negotiated" qualifiers="const">
<return type="bool">
</return>
<description>
</description>
</method>
<method name="is_ordered" qualifiers="const">
<return type="bool">
</return>
<description>
</description>
</method>
<method name="poll">
<return type="int" enum="Error">
</return>
<description>
</description>
</method>
<method name="was_string_packet" qualifiers="const">
<return type="bool">
</return>
<description>
</description>
</method>
</methods>
<members>
<member name="write_mode" type="int" setter="set_write_mode" getter="get_write_mode" enum="WebRTCDataChannel.WriteMode">
</member>
</members>
<constants>
<constant name="WRITE_MODE_TEXT" value="0" enum="WriteMode">
</constant>
<constant name="WRITE_MODE_BINARY" value="1" enum="WriteMode">
</constant>
<constant name="STATE_CONNECTING" value="0" enum="ChannelState">
</constant>
<constant name="STATE_OPEN" value="1" enum="ChannelState">
</constant>
<constant name="STATE_CLOSING" value="2" enum="ChannelState">
</constant>
<constant name="STATE_CLOSED" value="3" enum="ChannelState">
</constant>
</constants>
</class>