docs.unity3d.com
    目次を表示する/隠す

    Class RTCDataChannel

    Inheritance
    Object
    RefCountedObject
    RTCDataChannel
    Inherited Members
    RefCountedObject.disposed
    Namespace: Unity.WebRTC
    Syntax
    public class RTCDataChannel : RefCountedObject, IDisposable

    Properties

    BufferedAmount

    Declaration
    public ulong BufferedAmount { get; }
    Property Value
    Type Description
    UInt64

    Id

    Declaration
    public int Id { get; }
    Property Value
    Type Description
    Int32

    Label

    Declaration
    public string Label { get; }
    Property Value
    Type Description
    String

    MaxRetransmits

    Declaration
    public ushort MaxRetransmits { get; }
    Property Value
    Type Description
    UInt16

    MaxRetransmitTime

    Declaration
    public ushort MaxRetransmitTime { get; }
    Property Value
    Type Description
    UInt16

    Negotiated

    Declaration
    public bool Negotiated { get; }
    Property Value
    Type Description
    Boolean

    OnClose

    Declaration
    public DelegateOnClose OnClose { get; set; }
    Property Value
    Type Description
    DelegateOnClose

    OnError

    Declaration
    public DelegateOnError OnError { get; set; }
    Property Value
    Type Description
    DelegateOnError

    OnMessage

    Declaration
    public DelegateOnMessage OnMessage { get; set; }
    Property Value
    Type Description
    DelegateOnMessage

    OnOpen

    Declaration
    public DelegateOnOpen OnOpen { get; set; }
    Property Value
    Type Description
    DelegateOnOpen

    Ordered

    Declaration
    public bool Ordered { get; }
    Property Value
    Type Description
    Boolean

    Protocol

    Declaration
    public string Protocol { get; }
    Property Value
    Type Description
    String

    ReadyState

    The property returns an enum of the RTCDataChannelState which shows the state of the channel.

    Declaration
    public RTCDataChannelState ReadyState { get; }
    Property Value
    Type Description
    RTCDataChannelState
    Remarks

    Send(String) method must be called when the state is Open.

    See Also
    RTCDataChannelState

    Methods

    Close()

    Declaration
    public void Close()

    Dispose()

    Declaration
    public override void Dispose()
    Overrides
    RefCountedObject.Dispose()

    Finalize()

    Declaration
    protected void Finalize()

    Send(Byte[])

    The method Sends data across the data channel to the remote peer.

    Declaration
    public void Send(byte[] msg)
    Parameters
    Type Name Description
    Byte[] msg
    Exceptions
    Type Condition
    InvalidOperationException

    The method throws InvalidOperationException when ReadyState is not Open.

    See Also
    ReadyState

    Send(IntPtr, Int32)

    Declaration
    public void Send(IntPtr msgPtr, int length)
    Parameters
    Type Name Description
    IntPtr msgPtr
    Int32 length

    Send(String)

    The method Sends data across the data channel to the remote peer.

    Declaration
    public void Send(string msg)
    Parameters
    Type Name Description
    String msg
    Exceptions
    Type Condition
    InvalidOperationException

    The method throws InvalidOperationException when ReadyState is not Open.

    See Also
    ReadyState

    Send(Void*, Int32)

    Declaration
    public void Send(void *msgPtr, int length)
    Parameters
    Type Name Description
    Void* msgPtr
    Int32 length

    Send<T>(NativeArray<T>)

    Declaration
    public void Send<T>(NativeArray<T> msg)
        where T : struct
    Parameters
    Type Name Description
    NativeArray<T> msg
    Type Parameters
    Name Description
    T

    Send<T>(NativeSlice<T>)

    Declaration
    public void Send<T>(NativeSlice<T> msg)
        where T : struct
    Parameters
    Type Name Description
    NativeSlice<T> msg
    Type Parameters
    Name Description
    T

    See Also

    CreateDataChannel(String, RTCDataChannelInit)
    トップに戻る
    Copyright © 2023 Unity Technologies
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on Wednesday, November 1, 2023