PEER_GROUP_EVENT_DATA structure (p2p.h)

The PEER_GROUP_EVENT_DATA structure contains information about a specific peer group event that has occurred.

Syntax

typedef struct peer_group_event_data_tag {
  PEER_GROUP_EVENT_TYPE eventType;
  union {
    PEER_GROUP_STATUS                 dwStatus;
    PEER_EVENT_INCOMING_DATA          incomingData;
    PEER_EVENT_RECORD_CHANGE_DATA     recordChangeData;
    PEER_EVENT_CONNECTION_CHANGE_DATA connectionChangeData;
    PEER_EVENT_MEMBER_CHANGE_DATA     memberChangeData;
    HRESULT                           hrConnectionFailedReason;
  };
} PEER_GROUP_EVENT_DATA, *PPEER_GROUP_EVENT_DATA;

Members

eventType

PEER_GROUP_EVENT_TYPE enumeration value that specifies the type of peer group event that occurred. The type of event dictates the subsequent structure chosen from the union; for example, if this value is set to PEER_GROUP_EVENT_INCOMING_DATA, the populated union member is incomingData.

dwStatus

Specifies the PEER_GROUP_STATUS flag values that indicate the new status of the peer group. This field is populated if a PEER_GROUP_EVENT_STATUS_CHANGED event is raised.

incomingData

Specifies the PEER_EVENT_INCOMING_DATA structure that contains information on incoming data from a peer. This structure is populated if a PEER_GROUP_EVENT_INCOMING_DATA event is raised.

recordChangeData

Specifies the PEER_EVENT_RECORD_CHANGE_DATA structure that contains data that describes a record change. This structure is populated if a PEER_GROUP_EVENT_RECORD_CHANGED event is raised.

connectionChangeData

PEER_EVENT_CONNECTION_CHANGE_DATA structure that contains information when a direct or neighbor connection has changed. This structure is populated if a PEER_GROUP_EVENT_DIRECT_CONNECTION or PEER_GROUP_EVENT_NEIGHBOR_CONNECTION event is raised.

memberChangeData

PEER_EVENT_MEMBER_CHANGE_DATA structure that contains data when the status of a peer group member changes. This structure is populated if a PEER_GROUP_EVENT_MEMBER_CHANGED event is raised.

hrConnectionFailedReason

HRESULT that indicates the type of connection failure that occurred. This value is populated if a PEER_GROUP_EVENT_CONNECTION_FAILED event is raised. This value is one of the following:

Value Meaning
PEER_E_NO_MEMBERS_FOUND
No available peers within the peer group were found to connect to.
PEER_E_NO_MEMBER_CONNECTIONS
No member connections were available.
PEER_E_UNABLE_TO_LISTEN
The peer was unable to receive connection data for an unspecified reason.
PEER_E_NOT_AUTHORIZED
An attempt has been made to perform an unauthorized operation. For example, attempting to join a group with an invalid password.

Requirements

Requirement Value
Minimum supported client Windows 10 Build 20348
Minimum supported server Windows 10 Build 20348
Header p2p.h

See also

PEER_EVENT_CONNECTION_CHANGE_DATA

PEER_EVENT_INCOMING_DATA

PEER_EVENT_MEMBER_CHANGE_DATA

PEER_EVENT_RECORD_CHANGE_DATA

PEER_GROUP_EVENT_TYPE

PEER_GROUP_STATUS

PeerGroupGetEventData