Publishing a Presence Record

To publish a presence record, a new record MUST first be created, as specified in section If the local node has already published a presence record for the local node's node ID in the graph database, the values from the previous presence record MUST replace those already assigned in the new record.

Regardless, the Record fields MUST be set as follows:

  • The Modification Time MUST be set to the current peer time.

  • The Expiration Time MUST be set to the current peer time + Presence Lifetime.

  • The Record Type MUST be set to the GUID {00000400-0000-0000-0000-000000000000}.

  • The Node ID MUST be set to the local node ID.

  • The Attributes MUST be set to the application-specified string.

  • The Addresses field MUST include the list of addresses at which the local node ID is listening, stored in Listening addresses (see section 3.1.1).

  • The Autorefresh flag MUST NOT be set if the record is published because of a higher-layer application-triggered event, as specified in section Otherwise the flag MUST be set.

If there is already a presence record in the graph database with its Deleted flag unset and with the local node's node ID, the record MUST be updated using the newly created record, as specified in section Otherwise, the new record MUST be published, as specified in section