Module webrtc.java

Interface RTCDataChannelObserver


  • public interface RTCDataChannelObserver
    Used to receive events from the RTCDataChannel.
    Author:
    Alex Andres
    • Method Detail

      • onBufferedAmountChange

        void onBufferedAmountChange​(long previousAmount)
        The RTCDataChannel's buffered amount has changed.
        Parameters:
        previousAmount - The previous buffer amount.
      • onStateChange

        void onStateChange()
        The RTCDataChannel's state has changed.
      • onMessage

        void onMessage​(RTCDataChannelBuffer buffer)
        A data buffer was successfully received.

        NOTE: RTCDataChannelBuffer.data will be freed once this function returns so observers who want to use the data asynchronously must make sure to copy it first.

        Parameters:
        buffer - The buffer containing the received message.