3.1.5.3.2 Response Packet

The packet is processed as a connection response if SessionState is WAITING_ECR_MSG.

The packet is valid if EstablishConnectionHeader.ClientGuid is equal to QueueManager.Identifier and EstablishConnectionHeader.ServerGUID is equal to RemoteQMGuid and InternalHeader.Flags.CS is set to 0. If the packet is invalid, the protocol MUST discard the packet and close the session as specified in Closing a Session (section 3.1.5.9).

The protocol MUST set the RecoverableAckSendTimeout ADM element as follows:

  • Get the current system time, in milliseconds, since the operating system was started.

  • Calculate the round-trip time of the EstablishConnection Packet (section 2.2.3) by subtracting the EstablishConnectionHeader.TimeStamp field value from the current time.

  • Set the RecoverableAckSendTimeout ADM element to the round-trip time multiplied by 8. If the RecoverableAckSendTimeout ADM element is out of the range of 0x000001F4 to 0x0001D4C0, inclusive, set it to the closest limit.

The protocol MUST reply to a connection response by sending a ConnectionParameters Packet with the following field values:

  • The BaseHeader.Flags.IN field MUST be set.

  • The InternalHeader.Flags.PT field MUST be set to 0x3.

  • The InternalHeader.Flags.CS field MUST be set to 0.

  • The ConnectionParametersHeader.RecoverableAckTimeout field MUST be set to the RecoverableAckSendTimeout ADM element.

  • The ConnectionParametersHeader.AckTimeout field MUST be set to the AckWaitTimeout ADM element.

  • The ConnectionParametersHeader.WindowSize field MUST be set to the WindowSize ADM element.

The SessionState ADM element value MUST be set to WAITING_CPR_MSG. An entry MUST be appended to the OutgoingQueueReference.ConnectionHistory array; the Status ADM attribute of the array entry MUST be set to EstablishPacketReceived; 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.

See Receiving a ConnectionParameters Packet (section 3.1.5.4) for the next step in session initialization.