InstantMessagingFlow.BeginSendInstantMessage Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
BeginSendInstantMessage(String, AsyncCallback, Object) |
Send a text message in the conversation. |
BeginSendInstantMessage(ContentType, Byte[], AsyncCallback, Object) |
Send an instant message in the conversation. |
BeginSendInstantMessage(String, AsyncCallback, Object)
Send a text message in the conversation.
public:
IAsyncResult ^ BeginSendInstantMessage(System::String ^ textBody, AsyncCallback ^ userCallback, System::Object ^ state);
public IAsyncResult BeginSendInstantMessage (string textBody, AsyncCallback userCallback, object state);
member this.BeginSendInstantMessage : string * AsyncCallback * obj -> IAsyncResult
Public Function BeginSendInstantMessage (textBody As String, userCallback As AsyncCallback, state As Object) As IAsyncResult
Parameters
- textBody
- String
Text body.
- userCallback
- AsyncCallback
The method to be called when the asynchronous operation is completed.
- state
- Object
A user-provided object that distinguishes this particular asynchronous operation from other asynchronous operations.
Returns
An IAsyncResult that references the asynchronous operation.
Exceptions
Thrown when null is passed for a required parameter. The parameter name that is required is included in the exception message.
Thrown when the provider is in the invalid state to send a message.
Remarks
When a message is sent, some remote clients, including IM MCU, can send a tentative acceptance response (202) followed later by a delivery notification message (BeNotify). If the message receives tentative acceptance, it will carry a unique message id assigned to this message. The delivery notification received later will carry this message id so that it can be correlated to this message.
If the message receives a tentative acceptance response, then this method will wait for the delivery notification message before completing this operation. This will make it unnecessary for an application to keep track of the message id to correlate with delivery notification received later. If the application wants to complete the operation as soon as the tentative response is received, it can do so by ensuring that the property WaitingForDeliveryNotificationDisabled on the flow template is set to true. This can be either done globally using InstantMessagingSettings of the collaboration platform or by using Initialize method in InstantMessagingFlow during configuration. In that case, the application is responsible for correlating the message id with the delivery notification received later. The deprecated BeginSendMessage method's behavior is equivalent to calling this new BeginSendInstantMessage method when WaitingForDeliveryNotificationDisabled is set to true on this flow settings.
Applies to
BeginSendInstantMessage(ContentType, Byte[], AsyncCallback, Object)
Send an instant message in the conversation.
public:
IAsyncResult ^ BeginSendInstantMessage(System::Net::Mime::ContentType ^ contentType, cli::array <System::Byte> ^ body, AsyncCallback ^ userCallback, System::Object ^ state);
public IAsyncResult BeginSendInstantMessage (System.Net.Mime.ContentType contentType, byte[] body, AsyncCallback userCallback, object state);
member this.BeginSendInstantMessage : System.Net.Mime.ContentType * byte[] * AsyncCallback * obj -> IAsyncResult
Parameters
- contentType
- ContentType
The content type.
- body
- Byte[]
The message body.
- userCallback
- AsyncCallback
The method to be called when the asynchronous operation is completed.
- state
- Object
A user-provided object that distinguishes this particular asynchronous operation from other asynchronous operations.
Returns
An IAsyncResult that references the asynchronous operation.
Exceptions
Thrown when null is passed for a required parameter. The parameter name that is required is included in the exception message.
Thrown when the provider is in invalid state to send a message.
Remarks
When a message is sent, some remote clients, including IM MCU, can send a tentative acceptance response (202) followed later by a delivery notification message (BeNotify). If the message receives tentative acceptance, it will carry a unique message id assigned to this message. The delivery notification received later will carry this message id so that it can be correlated to this message.
If the message receives a tentative acceptance response, then this method will wait for the delivery notification message before completing this operation. This will make it unnecessary for an application to keep track of the message id to correlate with delivery notification received later. If the application wants to complete the operation as soon as the tentative response is received, it can do so by ensuring that the property WaitingForDeliveryNotificationDisabled on the flow template is set to true. This can be either done globally using InstantMessagingSettings of the collaboration platform or by using Initialize method in InstantMessagingFlow during configuration. In that case, the application is responsible for correlating the message id with the delivery notification received later. The deprecated BeginSendMessage method's behavior is equivalent to calling this new BeginSendInstantMessage method when WaitingForDeliveryNotificationDisabled is set to true on this flow settings.