3.1.4.8 Initiating a Session Key Exchange
The higher layer can initiate a session key exchange at any time, so long as the RunspacePool is in an Opened state (section 3.1.1.2).
The client ignores this higher-layer request if either of the following is true:
The session key (section 3.1.1.2.7) is already registered by the client.
The session key exchange is already in progress.
If this higher-layer request is ignored, then steps 2 and 3 of this procedure are skipped.
The client constructs a PUBLIC_KEY message (section 2.2.2.3) and sends it to server using a wxf:Send message (see section 3.1.5.1.1.
The client waits to receive an ENCRYPTED_SESSION_KEY (as specified in section 2.2.2.4) from the Pserver (see section 3.1.5.1.2) and updates the abstract data (see section 3.1.1.2.7).
The client notifies the higher-layer when the session key exchange is completed.