188.8.131.52 Receiving a Negotiate Response Message
The first message received by the initiating side of the connection is a Negotiate Response message.
The receiver of the message MUST verify:
The length of the received message is at least 32 bytes.
The NegotiatedVersion field is 0x0100.
The MaxReceiveSize field is at least 128 bytes.
The MaxFragmentedSize field is at least 131,072 bytes.
The CreditsGranted field is greater than 0.
The CreditsRequested field is greater than 0.
The PreferredSendSize field is less than or equal to Connection.MaxReceiveSize.
The Status field is 0.
If any of the preceding conditions are not satisfied, the receiver MUST terminate the connection and return a failure status to the caller of section 184.108.40.206.
Otherwise, the receiver MUST:
Set the Connection.Protocol to 0x0100.
Set the Connection.ReceiveCreditTarget to the value of the received the CreditsRequested field.
Set Connection.MaxReceiveSize to the smaller of Connection.MaxReceiveSize and the value of the received the PreferredSendSize field. If the result is less than 128, then Connection.MaxReceiveSize MUST be set to 128.
Set Connection.MaxSendSize to the smaller of Connection.MaxSendSize and the value of the received MaxReceiveSize field.
Set Connection.MaxReadWriteSize to the smaller of an implementation-specific value<6> and the value of the received MaxReadWriteSize field.
Set Connection.SendCredits to the value of the received the CreditsGranted field.
Set Connection.MaxFragmentedSendSize to MaxFragmentedSize.
The receive operations and credits MUST be initialized as specified in section 220.127.116.11. If the resulting Connection.ReceiveCredits is zero, the receiver MUST terminate the connection and return a failure status to the caller of section 18.104.22.168.
The Negotiation Timer MUST be canceled, the idle Connection Timer MUST be set to a value of Connection.KeepaliveInterval seconds, and Connection.Role MUST be set to "ESTABLISHED".
A success status MUST be returned to the caller of section 22.214.171.124.