Back to product page

Bandwidth method


Returns calculated bandwidth usage.

Type

Float.

Syntax

  • C#
  • C++
  • VB.NET
float devP2P.Bandwidth(IntPtr Handle, int chanid);
The Bandwidth(Handle,chanid) syntax has these parts:
HandleReference to the devP2P instance.
chanidInteger that specifies channel index.
Return valueFloat value representing megabytes per second bandwidth usage.

float Bandwidth(int chanid);
The Bandwidth(chanid) syntax has these parts:
chanidInteger that specifies channel index.
Return valueFloat value representing megabytes per second bandwidth usage.

Function P2P_Bandwidth(ByVal Handle As IntPtr, ByVal chanid As Integer) As Single
The Bandwidth(Handle,chanid) syntax has these parts:
HandleReference to the devP2P instance.
chanidInteger that specifies channel index.
Return valueFloat value representing megabytes per second bandwidth usage.

Remarks

This method returns calculated bandwidth usage for specific channel it. You can use it during, for example, file tranfers to monitor file transfer speed, since devP2P will autocalculate it for you. You can call BandwidthReset method to reset calculation just before file transfer start, to get accurate values.

Code sample

  • C++

Platforms

Windows
Mac OSX
Linux
BSD