Class DataChannelBase
Implements
Inherited Members
Namespace: Unity.RenderStreaming
Assembly: Unity.RenderStreaming.dll
Syntax
public abstract class DataChannelBase : MonoBehaviour, IDataChannel
Fields
label
Declaration
[SerializeField]
protected string label
Field Value
Type | Description |
---|---|
string |
local
Declaration
[SerializeField]
protected bool local
Field Value
Type | Description |
---|---|
bool |
Properties
Channel
Declaration
public RTCDataChannel Channel { get; protected set; }
Property Value
Type | Description |
---|---|
RTCData |
ConnectionId
Declaration
public string ConnectionId { get; protected set; }
Property Value
Type | Description |
---|---|
string |
IsConnected
Declaration
public bool IsConnected { get; }
Property Value
Type | Description |
---|---|
bool |
IsLocal
Declaration
public bool IsLocal { get; }
Property Value
Type | Description |
---|---|
bool |
Label
Declaration
public string Label { get; }
Property Value
Type | Description |
---|---|
string |
OnStartedChannel
Declaration
public OnStartedChannelHandler OnStartedChannel { get; set; }
Property Value
Type | Description |
---|---|
On |
OnStoppedChannel
Declaration
public OnStoppedChannelHandler OnStoppedChannel { get; set; }
Property Value
Type | Description |
---|---|
On |
Methods
OnClose(string)
Declaration
protected virtual void OnClose(string connectionId)
Parameters
Type | Name | Description |
---|---|---|
string | connectionId |
OnMessage(byte[])
Declaration
protected virtual void OnMessage(byte[] bytes)
Parameters
Type | Name | Description |
---|---|---|
byte[] | bytes |
OnOpen(string)
Declaration
protected virtual void OnOpen(string connectionId)
Parameters
Type | Name | Description |
---|---|---|
string | connectionId |
Send(byte[])
Declaration
public virtual void Send(byte[] msg)
Parameters
Type | Name | Description |
---|---|---|
byte[] | msg |
Send(string)
Declaration
public virtual void Send(string msg)
Parameters
Type | Name | Description |
---|---|---|
string | msg |
SetChannel(string, RTCDataChannel)
Declaration
public virtual void SetChannel(string connectionId, RTCDataChannel channel)
Parameters
Type | Name | Description |
---|---|---|
string | connectionId | |
RTCData |
channel |
SetChannel(SignalingEventData)
Declaration
public virtual void SetChannel(SignalingEventData data)
Parameters
Type | Name | Description |
---|---|---|
Signaling |
data |