MSFKFlintChannel Class Reference
| Inherits from | NSObject |
| Declared in | MSFKFlintChannel.h MSFKFlintChannel.m |
Overview
A MSFKFlintChannel is used to send and receive messages that are tagged with a specific namespace. In this way, multiple channels may be multiplexed over a single connection to the device.
Subclasses should implement the @link MSFKFlintChannel#didReceiveTextMessage: @endlink and/or @link MSFKFlintChannel#didReceiveBinaryMessage: @endlink methods to process incoming messages, and will typically provide additional methods for sending messages that are specific to a given namespace.
@ingroup Messages
Instance Methods
didConnect
Called when this channel is added to a connected handler, or when then disconnected handler to which this channel has been added becomes connected.
- (void)didConnectDiscussion
Called when this channel is added to a connected handler, or when then disconnected handler to which this channel has been added becomes connected.
This implementation updates isConnected, so if subclasses override this method they should call through to the super implementation.
Declared In
MSFKFlintChannel.hdidDisconnect
Called when this channel is removed from a connected handler, or when then connected handler to which this channel has been added becomes disconnected.
- (void)didDisconnectDiscussion
Called when this channel is removed from a connected handler, or when then connected handler to which this channel has been added becomes disconnected.
This implementation updates isConnected, so if subclasses override this method they should call through to the super implementation.
Declared In
MSFKFlintChannel.hdidReceiveTextMessage:
Called when a text message has been received for this channel. The default implementation is a no-op.
- (void)didReceiveTextMessage:(NSString *)textMessageParameters
- message
The message string.
Discussion
Called when a text message has been received for this channel. The default implementation is a no-op.
Declared In
MSFKFlintChannel.hgenerateRequestID
Generates a request ID for a new message.
- (NSInteger)generateRequestIDDiscussion
Generates a request ID for a new message.
Declared In
MSFKFlintChannel.hgenerateRequestNumber
A convenience method which wraps generateRequestID in an NSNumber.
- (NSNumber *)generateRequestNumberDiscussion
A convenience method which wraps generateRequestID in an NSNumber.
Declared In
MSFKFlintChannel.hinitWithNamespace:
Designated initializer. Constructs a new MSFKFlintChannel with the given namespace.
- (id)initWithNamespace:(NSString *)protocolNamespaceParameters
- protocolNamespace
The namespace.
Discussion
Designated initializer. Constructs a new MSFKFlintChannel with the given namespace.
Declared In
MSFKFlintChannel.hsendTextMessage:
Sends a text message.
- (BOOL)sendTextMessage:(NSString *)textMessageParameters
- message
The message string.
Return Value
YES on success or NO if the message could not be sent (because
the handler is not connected, or because the send buffer is too full at the moment).
Discussion
Sends a text message.
Declared In
MSFKFlintChannel.h