nn::nex::NetZ::Terminate Member Function

Syntax

virtual qBool Terminate(
     CallContext * pContext
);

Parameters

Name Description
pContext Pointer to the CallContext of the call.

Return Values



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.

Description

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.

Revision History

2012/09/28
Added that standard disconnection is not performed.
2011/05/24
Initial version.

CONFIDENTIAL