Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
hp OpenCall SS7 platform Application Developer's Guide: For Release 3.1 on Linux > Chapter 12 Using the ISUP API

Closing and Destroying a Probe

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

Closing and destroying a probe object should only be done when you are certain that it will no longer be used. Its lifespan must be carefully considered, as recreating and re-opening a probe object places a high overhead on the API mechanism.

Closing and destroying a probe object does not stop the application, it only closes the connection to the SS7 stack.

Close()

This method closes the socket connection between a probe object and an SS7 stack. You must do this before destroying the probe object.

For details about the syntax, parameters, and return values of the close() method, see the IsupProbe(3) man page.

Destroy()

Only when the probe object has been closed, should you destroy it. After destroying it, the pointer to the destroyed probe object is set to NULL, thus avoiding its subsequent use.

When a probe object is destroyed, its activity object is not automatically destroyed.

For details about the syntax, parameters, and return values of the destroySMProbe and destroyBPProbe() methods, see the IsupMgr(3) man page.

The usual time to destroy a probe object is at application termination. Normally, you do not destroy a probe object during the life of the application.

Example 12-6 Closing and Destroying an IsupSMProbe Object

ISUP::CloseStatus 	        CloseStatus;
ISUP::DestroyStatus * destroyStatus;
IsupSMProbe * IsupSMProbe;
MyActivityObject * const anActivityObject= new myActivityObject();

closeStatus = isupSMProbe->close();
if (!closeStatus.isOk()){
cout << “IsupSMProbe:: failure to close Probe /n” << flush;
cout << “Error =” << closeStatus << “/n” << flush;
// error recovery
}

destroyStatus = isupMgr->destroySMProbe(isupSMProbe);
if (!destroyStatus.isOk()){
cout << “IsupSMProbe:: failure to destroy Probe /n” << flush;
cout << “Error = “ << destroyStatus << “/n” << flush;
// error recovery
}
delete myActivityObject;
Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© Hewlett-Packard Development Company, L.P.