 |
void onMessageDeliveryFailed(
string messageID,
int errorCode, string errorMessage, DateTime errorTime
);
|
Create a function with this header and attach it to the
onMessageDeliveryFailed event to receive notifications
about message delivery failures.
Parameters
messageID - The message
id that was returned by the SMS Gateway when you have posted
the message for sending using the
sendMessage method.
errorCode - An integer number
describing the reason for delivery failure
errorMessage - The
text describing the reason for delivery failure
errorTime - The
timestamp that marks the occurence of the event
Example
Step 1. - Create the event handling function:
void myDeliveryFauilureHandler(string messageID,int errorCode, string errorMessage, DateTime errorTime)
{
console.writeln("The message delivery has failed because "+errorMessage);
};
Step 2. - Attach this event to the SMSClient object:
mySMSClient.onMessageDeliveryFailed += ServerEventSink.wrap(myDeliveryFauilureHandle);
Hint: Notice the ServerEventSink.wrap method, that is used to attach the event.
This wrapper is used to work around an error that can happen when
asynchronous callbacks are invoked in .NET remoting.
|