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;