Interface DataChannelCallback.BinaryMessage

All Known Subinterfaces:
DataChannelCallback.Message
Enclosing interface:
DataChannelCallback
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface DataChannelCallback.BinaryMessage
Called when the channel receives a message.

While set, messages can't be received with DataChannel.receiveMessage().

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    onBinary(DataChannel channel, ByteBuffer buffer)
    The buffer is only valid during this callback; copy bytes that must outlive it.
  • Method Details

    • onBinary

      void onBinary(DataChannel channel, ByteBuffer buffer)
      The buffer is only valid during this callback; copy bytes that must outlive it. The default synchronous executor receives borrowed native storage. Custom executors receive an owned copy made before the native callback returns.