#import <FlutterBinaryMessenger.h>
A facility for communicating with the Flutter side using asynchronous message passing with binary messages.
Implementated by:
Definition at line 49 of file FlutterBinaryMessenger.h.
◆ cleanUpConnection:
Clears out a channel's message handler if that handler is still the one that was created as a result of setMessageHandlerOnChannel:binaryMessageHandler:
.
- Parameters
-
connection | The result from setMessageHandlerOnChannel:binaryMessageHandler: . |
◆ makeBackgroundTaskQueue
TODO(gaaclarke): Remove optional when macos supports Background Platform Channels.
◆ sendOnChannel:message:
- (void) sendOnChannel: |
|
(NSString *) |
channel |
message: |
|
(NSData *_Nullable) |
message |
|
|
| |
|
required |
Sends a binary message to the Flutter side on the specified channel, expecting no reply.
- Parameters
-
channel | The channel name. |
message | The message. |
◆ sendOnChannel:message:binaryReply:
- (void) sendOnChannel: |
|
(NSString *) |
channel |
message: |
|
(NSData *_Nullable) |
message |
binaryReply: |
|
(FlutterBinaryReply _Nullable) |
callback |
|
|
| |
|
required |
Sends a binary message to the Flutter side on the specified channel, expecting an asynchronous reply.
- Parameters
-
channel | The channel name. |
message | The message. |
callback | A callback for receiving a reply. |
◆ setMessageHandlerOnChannel:binaryMessageHandler:
Registers a message handler for incoming binary messages from the Flutter side on the specified channel.
Replaces any existing handler. Use a nil
handler for unregistering the existing handler.
- Parameters
-
channel | The channel name. |
handler | The message handler. |
- Returns
- An identifier that represents the connection that was just created to the channel.
◆ setMessageHandlerOnChannel:binaryMessageHandler:taskQueue:
The documentation for this protocol was generated from the following file: