Share via


InstantMessagingFlow

An InstantMessagingFlow instance represents an instant messaging connection with a single remote participant.

The ComposingTimeoutValue property is used to control the time-out value that reverts the local composing state to Idle. If an application sets LocalComposingState to Composing, it is automatically reverted to Idle if the application does not set LocalComposingState to Composing again within this idle time-out. Several seconds can elapse after the time-out occurs for the state to change to Idle. An application cannot set LocalComposingState to Idle.

Getting or setting LocalComposingState will result in a "Typing" or "Idle" notification to be sent to remote participants. After being set to Typing, automatic refresh of the Typing state occurs every three seconds until a message is sent or the state is set explicitly to Idle. If a message is sent, it is not necessary to set the state to Idle because the composing state will be automatically reset to Idle. A RemoteComposingStateChanged event will not be raised when this property is set to Idle.

An application uses the Initialize(InstantMessagingFlowTemplate) method to configure an InstantMessagingFlow instance as ConsumedLocally (the default) or as ProxiedToRemoteEntity, values of the InstantMessageConsumptionMode enumeration. If the flow is configured for ProxiedToRemoteEntity, an application must register for the MessageReceived event and must send message delivery notifications using BeginSendSuccessDeliveryNotification(InstantMessageId, AsyncCallback, Object) or BeginSendFailureDeliveryNotification(InstantMessageId, Int32, AsyncCallback, Object) on each received message. Failure to send these delivery notification messages can result in a memory leak.