PEER_EVENT_CONNECTION_CHANGE_DATA structure (p2p.h)
A PEER_GRAPH_EVENT_DATA structure points to the PEER_EVENT_CONNECTION_CHANGE_DATA structure if one of the following peer events is triggered:
- PEER_GRAPH_EVENT_NEIGHBOR_CONNECTION
- PEER_GRAPH_EVENT_DIRECT_CONNECTION
- PEER_GROUP_EVENT_NEIGHBOR_CONNECTION
- PEER_GROUP_EVENT_DIRECT_CONNECTION
Syntax
typedef struct peer_event_connection_change_data_tag {
DWORD dwSize;
PEER_CONNECTION_STATUS status;
ULONGLONG ullConnectionId;
ULONGLONG ullNodeId;
ULONGLONG ullNextConnectionId;
HRESULT hrConnectionFailedReason;
} PEER_EVENT_CONNECTION_CHANGE_DATA, *PPEER_EVENT_CONNECTION_CHANGE_DATA;
Members
dwSize
Specifies the size of a structure.
status
Specifies the type of change in a neighbor or direct connection. Valid values are the following.
ullConnectionId
Specifies the unique ID for a connection that has changed.
ullNodeId
Specifies the unique ID for the node that has changed.
ullNextConnectionId
Windows Vista or later. Contains the next available node ID that the grouping or graphing APIs will attempt to connect to when a connection fails. If this member has a value of 0, no further connections will be attempted.
hrConnectionFailedReason
Windows Vista or later. Specifies the type of error when a connection fails. hrConnectionFailedReason can return the following error codes.
Value | Description |
---|---|
PEER_E_CONNECTION_REFUSED | A connection has been established and refused. The remote node is already at maximum number of connections or a connection already exists. |
PEER_E_CONNECTION_FAILED | An attempt to connect to a remote node has failed. |
PEER_E_CONNECTION_NOT_AUTHENTICATED | A connection is lost during the authentication phase. This is the result of a network failure or the remote node breaking the connection. |
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows XP with SP2 [desktop apps only],Windows XP with SP1 with the Advanced Networking Pack forWindows XP |
Minimum supported server | None supported |
Header | p2p.h |