virtual qBool Terminate( CallContext * pContext );
Name | Description | |
---|---|---|
pContext |
Pointer to the CallContext of the call. |
Value | Description |
---|---|
true |
Returned when the P2P session is forced to close normally. |
false |
Returned when the P2P session was forced to close abnormally, or when an error has occurred. |
Terminates the P2P session without destroying the objects.
Please make sure to execute this function before calling the NetZ
destructor. This function may take up to 5 seconds to complete depending on communication conditions. See the programming manual for the factors in processing time.
The termination process destroys all duplicated objects. References to duplicated objects from the application (for example, references created from RefTemplate
or DuplicatedObjectRef
) are forcibly destroyed if any remain. Therefore, you must always free all references to duplicated objects that are maintained by the application.
These duplicated objects are included in the local session object, which is then deleted by NetZ while shutting down the current session. Consequently, to participate in another session, you must first delete the current NetZ
object and create a new one. You need to create the NetZ
instance again even if the Session::CreateSession
and Session::JoinSession
processes have failed, because it is possible that the local session object still exists.
If this function is called asynchronously, processing continues while the P2P session is shutting down.
CONFIDENTIAL