DataChannel

tee3.webrtc

## 类 DataChannel

- java.lang.Object
- - tee3.webrtc.DataChannel

-     public class DataChannel
      extends java.lang.Object

  Java wrapper for a C++ DataChannelInterface.

- - ### 嵌套类概要

    嵌套类
    限定符和类型 | 类和说明
    --- | ---
    `static class` | `DataChannel.Buffer` Java version of C++ DataBuffer.
    `static class` | `DataChannel.Init` Java wrapper for WebIDL RTCDataChannel.
    `static interface` | `DataChannel.Observer` Java version of C++ DataChannelObserver.
    `static class` | `DataChannel.State` Keep in sync with DataChannelInterface::DataState.

  - ### 构造器概要

    构造器
    构造器和说明
    `DataChannel(long nativeDataChannel)`

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `long` | `bufferedAmount()` Return the number of bytes of application data (UTF-8 text and binary data) that have been queued using SendBuffer but have not yet been transmitted to the network.
    `void` | `close()` Close the channel.
    `void` | `dispose()` Dispose of native resources attached to this channel.
    `int` | `id()`
    `java.lang.String` | `label()`
    `void` | `registerObserver(DataChannel.Observer observer)` Register |observer|, replacing any previously-registered observer.
    `boolean` | `send(DataChannel.Buffer buffer)` Send |data| to the remote peer; return success.
    `DataChannel.State` | `state()`
    `void` | `unregisterObserver()` Unregister the (only) observer.

    - ### 从类继承的方法 java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 构造器详细资料

    - #### DataChannel

          public DataChannel(long nativeDataChannel)

  - ### 方法详细资料

    - #### registerObserver

          public void registerObserver(DataChannel.Observer observer)

      Register |observer|, replacing any previously-registered observer.

    - #### unregisterObserver

          public void unregisterObserver()

      Unregister the (only) observer.

    - #### label

          public java.lang.String label()

    - #### id

          public int id()

    - #### state

          public DataChannel.State state()

    - #### bufferedAmount

          public long bufferedAmount()

      Return the number of bytes of application data (UTF-8 text and binary data) that have been queued using SendBuffer but have not yet been transmitted to the network.

    - #### close

          public void close()

      Close the channel.

    - #### send

          public boolean send(DataChannel.Buffer buffer)

      Send |data| to the remote peer; return success.

    - #### dispose

          public void dispose()

      Dispose of native resources attached to this channel.