Module webrtc.java

Class RTCDataChannelBuffer

java.lang.Object
dev.onvoid.webrtc.RTCDataChannelBuffer

public class RTCDataChannelBuffer extends Object
A NIO based buffer used to send data over an RTCDataChannel.
Author:
Alex Andres
  • Field Details

    • data

      public final ByteBuffer data
      The underlying data.
    • binary

      public final boolean binary
      Indicates whether the data contains UTF-8 text or binary data.
  • Constructor Details

    • RTCDataChannelBuffer

      public RTCDataChannelBuffer(ByteBuffer data, boolean binary)
      Creates an instance of RTCDataChannelBuffer with the specified payload and indicator what kind of data the payload contains.
      Parameters:
      data - The byte buffer containing the data to send.
      binary - Whether the buffer contains UTF-8 text or binary data.