Protocols/MSNP/Activities/SDK/Techref/Objectmodel/Objects/Channel/Events/OnDataError: Difference between revisions

From NINA Wiki
Jump to navigation Jump to search
(Created automatically by Anima Importer)
No edit summary
 
Line 1: Line 1:
<!-- Generated @ 08/12/2022 23:45:53 +01:00 using Anima's CHM converter based on techref/objectmodel/objects/channel/events/OnDataError.htm -->
<!-- Generated @ 08/12/2022 23:45:53 +01:00 using Anima's CHM converter based on techref/objectmodel/objects/channel/events/OnDataError.htm -->
{{Protocols/MSNP|section=Activities}}
{{Protocols/MSNP|section=Activities}}
__NOTOC__= <a class="clsStd" href="../index.htm">Channel</a>.OnDataError Event =  
__NOTOC__
= [[Protocols/MSNP/Activities/SDK/Techref/Objectmodel/Objects/Channel/Index|Channel]].OnDataError Event =  




Fires when a <span class="clsEvent">SendData</span> operation was not successful.
Fires when a <span class="clsEvent">SendData</span> operation was not successful.


VBScript Syntax
=== VBScript Syntax ===


<div class="clsCodeStd">
<div class="clsCodeStd">
Line 12: Line 13:
<pre class="clsCode">function Channel_OnDataError()  
<pre class="clsCode">function Channel_OnDataError()  
' Error during SendData, may need to retry.
' Error during SendData, may need to retry.
End Function
End Function</pre>
    </pre>


</div>
</div>
JavaScript Syntax
=== JavaScript Syntax ===


<div class="clsCodeStd">
<div class="clsCodeStd">
Line 22: Line 22:
<pre class="clsCode">function Channel_OnDataError() {
<pre class="clsCode">function Channel_OnDataError() {
// Error during SendData, may need to retry.
// Error during SendData, may need to retry.
}
}</pre>
    </pre>


</div>
</div>
JavaScript Example
 
=== JavaScript Example ===


<div class="clsCodeStd">
<div class="clsCodeStd">
Line 62: Line 62:


</div>
</div>
Remarks
 
=== Remarks ===


Limit the number of retries attempted when <span class="clsEvent">OnDataError</span> occurs, to decrease the chance of receiving data out of order.
Limit the number of retries attempted when <span class="clsEvent">OnDataError</span> occurs, to decrease the chance of receiving data out of order.

Latest revision as of 00:45, 13 August 2022


MSNP Protocol
Activity SDK
Introduction to the MSN Messenger Activity API
Key Requirements for a MSN Messenger Activity
Introduction to MSN Messenger Activity API
Overview of MSN Messenger Activity API
Activities Menu
System Requirements
Standard vs. Advanced Applications
Supported Countries and Languages
MSN Messenger Activity API Support
Copyright Information
Glossary
MSN Messenger Activity API Process
MSN Messenger Activity Process Overview
Supporting Documentation
Requesting Usage of Special Permissions
Submitting Pre-compliance Testing Results
MSN Requirements for Developing an Activity API Application
Additional Activity API Application Development Requirements
Selecting Development Options
Activity API Restrictions
Developing a MSN Messenger Activity
Development Considerations
Getting Started
Required Definitions
Document Body Basics
Single-User Application
Multiuser Application
Designing MSN Messenger Activity Graphics
Testing an Activity
Testing Overview
The Local XML File
Test Environment Setup
Increasing MSN Messenger Activity Usage
Understanding How to Increase Activity Usage with MSN
Design Considerations for Increased Activity Usage
Calling the MSN Messenger Client Directly
Calling the MSN Messenger Client from a URL
Using the MSN Messenger Variables
Technical Reference
Obtaining Access to Restricted Features
Permission Flags
ActiveX Flag
EnableIP Flag
PassportSiteID Flag
ReceiveIM Flag
ReplaceIM Flag
SendFile Flag
SendIM Flag
UserProperties Flag
The Activity Object Model
Enumerations
ConnectionType Enumeration
FileStatus Enumeration
Methods
CloseApp Method
Objects
Channel Object
Events
OnAppClose Event
OnDataError Event
OnDataReceived Event
OnFileProgress Event (Restricted)
OnFileReceived Event (Restricted)
OnIMReceived Event (Restricted)
OnRemoteAppClosed Event
OnRemoteAppLoaded Event
OnSendFileCancelled Event (Restricted)
OnTypeChanged Event
Methods
CancelSendFile Method (Restricted)
EnterIM Method (Restricted)
Initialize Method
SendData Method
SendFile Method (Restricted)
SendIM Method (Restricted)
SendIMAsUser Method (Restricted)
Properties
Data Property
Error Property
FileInfo Property (Restricted)
Type Property
IM (read-only) Property (Restricted)
IM (read-write) Property (Restricted)
Error Object
Type Property
Data Property
FileInfo Object
Path Property
Size Property
Progress Property
Incoming Property
Status Property
Messenger Object
Options Method
Phone Method
User Object
EMail Property (Restricted)
GlobalIP Property (Restricted)
LocalIP Property (Restricted)
Name Property (Restricted)
PUID Property (Restricted)
Users Collection
Item Method
_NewEnum Method
Count Property
Me Property
Inviter Property
Overview
IntroductionTermsClients
Reference
Error ListCommandsRelying Party SuiteSpotlife
Services
XMPPHTTP GatewayTabsActivities
Documentation
Development ToolsMSNP Grid
PolygamyURLs used by MSN
Documents
Protocol Versions
Version 21
Version 18
Version 16
Version 15
Version 14
Version 13
Version 12
Version 11
Version 9
Version 8
Version 2
MSNC
IntroductionP2PObject DescriptorDisplay PicturesFile Transfer
Scenarios
Microsoft Messenger for Mac
MSNP on WebTV (MSNTV)

Channel.OnDataError Event

Fires when a SendData operation was not successful.

VBScript Syntax

function Channel_OnDataError() 
' Error during SendData, may need to retry.
End Function

JavaScript Syntax

function Channel_OnDataError() {
// Error during SendData, may need to retry.
}

JavaScript Example

<script language="JavaScript">

int giDataErrors = 0;

function Channel_OnDataError() {
// Error during SendData, retry up to three times, 
// five seconds between each retry, and then call it quits.
// Any retries could lead to data being received out of order, 
// so check for this in your OnDataReceived.

    if (giDataError >= 3) { 
        setGameOver(); 
    }
    else {
        giDataErrors++;
    myData = window.external.Channel.Error.Data;
    window.setTimeout("SafeSendData(" + myData + ")",5000);
    }

}

function SafeSendData(toSend) {
// SafeSendData is SendData with an error handler.
    try {
    window.external.Channel.SendData(toSend);
    }
    catch (ex) {
    // Optional debugging output
    }
}

Remarks

Limit the number of retries attempted when OnDataError occurs, to decrease the chance of receiving data out of order.