Package tel.schich.libdatachannel
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.
Called when the channel receives a message.
While set, messages can't be received with DataChannel.receiveMessage().
-
Method Summary
Modifier and TypeMethodDescriptionvoidonBinary(DataChannel channel, ByteBuffer buffer) The buffer is only valid during this callback; copy bytes that must outlive it.
-
Method Details
-
onBinary
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.
-