Platform SDK: Windows Networking

NETCONNECTINFOSTRUCT

The NETCONNECTINFOSTRUCT structure contains information about the expected performance of a connection used to access a network resource. The structure is used in the MultinetGetConnectionPerformance function.

typedef struct _NETCONNECTINFOSTRUCT{
    DWORD cbStructure;
    DWORD dwFlags;
    DWORD dwSpeed;
    DWORD dwDelay;
    DWORD dwOptDataSize;
} NETCONNECTINFOSTRUCT, *LPNETCONNECTINFOSTRUCT;

Members

cbStructure
Specifies the size, in bytes, of the NETCONNECTINFOSTRUCT structure. The caller must supply this value.
dwFlags
Specifies a DWORD value that contains a set of bit flags describing the connection. This member can be one or more of the following values.
Value Meaning
WNCON_FORNETCARD In the absence of information about the actual connection, the information returned applies to the performance of the network card.

If this flag is not set, information is being returned for the current connection with the resource, with any routing degradation taken into consideration.

WNCON_NOTROUTED The connection is not being routed.

If this flag is not set, the connection may be going through routers that limit performance. Consequently, if WNCON_FORNETCARD is set, actual performance may be much less than the information returned.

WNCON_SLOWLINK The connection is over a medium that is typically slow (for example, over a modem using a normal quality phone line). You should not set the WNCON_SLOWLINK bit if the dwSpeed member is set to a nonzero value.
WNCON_DYNAMIC Some of the information returned is calculated dynamically, so reissuing this request may return different (and more current) information.

dwSpeed
Specifies a DWORD value that contains the speed of the media to the network resource in units of 100 bits per second (bps).

For example, a 1200 baud point-to-point link returns 12. A value of zero indicates that no information is available. A value of one indicates that the actual value is greater than the maximum that can be represented by the member.

dwDelay
Specifies a DWORD value that contains the one-way delay time, in milliseconds, that the network introduces when sending information. (The delay is the time between when the network begins sending data and the time that the data starts being received.) This delay is in addition to any latency incorporated in the calculation of the dwSpeed member; therefore the value of this member is zero for most resources.

A value of zero indicates that no information is available. A value of one indicates that the actual value is greater than the maximum that can be represented by the member.

dwOptDataSize
Specifies a DWORD value that contains a recommendation for the size of data, in bytes, that an application should use when making a single request to the network resource.

For example, for a disk network resource, this value might be 2048 or 512 when writing a block of data. A value of zero indicates that no information is available.

Requirements

  Windows NT/2000: Requires Windows NT 3.51 or later.
  Header: Declared in Npapi.h.

See Also

Windows Networking (WNet) Overview, Windows Networking Structures, MultinetGetConnectionPerformance