Package tvi.webrtc

Class DataChannel

java.lang.Object
tvi.webrtc.DataChannel

public class DataChannel extends Object
Java wrapper for a C++ DataChannelInterface.
  • Constructor Details

    • DataChannel

      public DataChannel(long nativeDataChannel)
  • Method Details

    • registerObserver

      public void registerObserver(DataChannel.Observer observer)
      Register `observer`, replacing any previously-registered observer.
    • unregisterObserver

      public void unregisterObserver()
      Unregister the (only) observer.
    • label

      public 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.