22.214.171.124.2 Receive Other Messages During Authentication
If the local node is the connection initiator for a connection in the OUT_CONN_STATE_SENT_AUTHINFO state or a connection responder for a connection in the IN_CONN_STATE_GOT_AUTHINFO state, and a message is received before the connection reaches the IN_CON_STATE_AUTHENTICATED or OUT_CON_STATE_AUTHENTICATED state, the message MUST be passed to the configured graph security provider. If the graph security provider returns an error, the connection MUST be terminated. If the graph security provider returns a message to send, the message MUST be sent to the remote node.
If the graph security provider returns a code that states that authentication is complete, the connection MUST move to the IN_CONN_STATE_AUTHENTICATED state (in the case of the responder) or OUT_CONN_STATE_AUTHENTICATED state (in the case of the initiator), and the Authentication Timer MUST be canceled.
If any error occurs during connection establishment, the connection MUST be aborted and any further messages received on the connection MUST NOT be processed.
For a connection initiator, when the connection moves to the AUTHENTICATED state, a CONNECT message MUST be sent:
The Direct bit MUST be set if the Direct Connection flag is set.
The Update bit MUST NOT be set.
The Neighbor List bit SHOULD be set if the Direct Connection flag is set.
The Source Node ID MUST be the node ID of the local node.
The Address Array MUST be empty if the local node is not currently listening (as indicated by the IsListening flag). Otherwise, the Address Array MUST contain the listening addresses listed in Listening Addresses.
The Friendly Name field MAY contain a string, though this field has no impact on the protocol.
A Connect Timer MUST be set for the connection as specified in section 126.96.36.199.
TConnect MUST be set to the local node's Peer Time when the CONNECT message is sent.