3.1.5.2.3 Sending an EstablishConnection Request Packet
If the Session Initialization Timer (section 3.1.2.1) is running, the protocol MUST stop the timer before sending an EstablishConnection Packet (section 2.2.3).
The EstablishConnection Packet MUST be sent to the acceptor by using the transport settings specified in Protocol Session (section 2.1.1). The following fields MUST be set in the EstablishConnection Packet:
BaseHeader.Flags.IN MUST be set.
InternalHeader.Flags.PT field MUST be set to 0x2.
InternalHeader.Flags.CS MUST be set to 0.
EstablishConnectionHeader.ClientGuid MUST be set to QueueManager.Identifier.
EstablishConnectionHeader.ServerGuid MUST be set to RemoteQMGuid if a direct format name was not used. EstablishConnectionHeader.ServerGuid MUST be zero-filled if a direct format name was used.
EstablishConnectionHeader.TimeStamp MUST be set to the time, in milliseconds, since the operating system was started.
EstablishConnectionHeader.OperatingSystem.SE MUST be set to 0 if a Ping Request (section 2.1.2) was sent, as described in section 3.1.5.2.2; otherwise, it MUST be set to 1.
The remaining fields of EstablishConnectionHeader MUST be initialized as specified in section 2.2.3.1.
The SessionState value MUST be set to WAITING_ECR_MSG. An entry MUST be appended to the OutgoingQueueReference.ConnectionHistory array; the Status ADM attribute of the array entry MUST be set to InProcess; the ConnectionHistoryTime ADM attribute of the array entry MUST be set to the current time; the Error ADM attribute of the array entry MUST be set to zero; and the AddressList ADM attribute of the array entry MUST be set to the RemoteQMAddress ADM element.
After the EstablishConnection Packet is sent, the protocol MUST start the Session Initialization Timer.
See Receiving an EstablishConnection Packet (section 3.1.5.3) for the next step in session initialization.
If the OutgoingQueueReference.State is not OnHold, OutgoingQueueReference.State MUST be set to Waiting.