Flutter Engine
<FlutterBinaryMessenger > Protocol Reference

#import <FlutterBinaryMessenger.h>

Inheritance diagram for <FlutterBinaryMessenger >:

Instance Methods

(void) - sendOnChannel:message:
 
(void) - sendOnChannel:message:binaryReply:
 
(FlutterBinaryMessengerConnection- setMessageHandlerOnChannel:binaryMessageHandler:
 
(void) - cleanupConnection:
 

Detailed Description

A facility for communicating with the Flutter side using asynchronous message passing with binary messages.

Implementated by:

Definition at line 46 of file FlutterBinaryMessenger.h.

Method Documentation

◆ cleanupConnection:()

- (void FlutterBinaryMessenger) cleanupConnection: (FlutterBinaryMessengerConnection connection

Clears out a channel's message handler if that handler is still the one that was created as a result of setMessageHandlerOnChannel:binaryMessageHandler:.

Parameters
connectionThe result from setMessageHandlerOnChannel:binaryMessageHandler:.

◆ sendOnChannel:message:()

- (void FlutterBinaryMessenger) sendOnChannel: (NSString *)  channel
message: (NSData *_Nullable)  message 

Sends a binary message to the Flutter side on the specified channel, expecting no reply.

Parameters
channelThe channel name.
messageThe message.

◆ sendOnChannel:message:binaryReply:()

- (void FlutterBinaryMessenger) sendOnChannel: (NSString *)  channel
message: (NSData *_Nullable)  message
binaryReply: (FlutterBinaryReply _Nullable)  callback 

Sends a binary message to the Flutter side on the specified channel, expecting an asynchronous reply.

Parameters
channelThe channel name.
messageThe message.
callbackA callback for receiving a reply.

◆ setMessageHandlerOnChannel:binaryMessageHandler:()

- (FlutterBinaryMessengerConnection FlutterBinaryMessenger) setMessageHandlerOnChannel: (NSString *)  channel
binaryMessageHandler: (FlutterBinaryMessageHandler _Nullable)  handler 

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
channelThe channel name.
handlerThe message handler.
Returns
An identifier that represents the connection that was just created to the channel.

The documentation for this protocol was generated from the following file: