Back to product page

TestBandwidth method


Tests bandwidth with remote peer.

Type

Integer.

Syntax

  • C#
  • C++
  • VB.NET
int devP2P.TestBandwidth(IntPtr Handle, int chanid, long size);
The TestBandwidth(Handle,chanid,size) syntax has these parts:
HandleReference to the devP2P instance.
chanidInteger that specifies channel index.
sizeTotal size of data to transmit to remote.
Return value0 (ErrorNone) if success, otherwise negative value from Errors enumeration.

int TestBandwidth(int chanid, unsigned long size);
The TestBandwidth(chanid,size) syntax has these parts:
chanidInteger that specifies channel index.
sizeTotal size of data to transmit to remote.
Return value0 (ErrorNone) if success, otherwise negative value from Errors enumeration.

Function P2P_TestBandwidth(ByVal Handle As IntPtr, ByVal chanid As Integer, ByVal size As Long) As Integer
The TestBandwidth(Handle,chanid,size) syntax has these parts:
HandleReference to the devP2P instance.
chanidInteger that specifies channel index.
sizeTotal size of data to transmit to remote.
Return value0 (ErrorNone) if success, otherwise negative value from Errors enumeration.

Remarks

TestBandwith is used to measure speed with remote peer. It is almost the same as SendFile, but random data is sent to remote, and remote does not store it anywhere. It can be used to quickly check how good is your connection with remote peer. You can use Bandwidth method to obtain calculated bandwidth values.

Platforms

Windows
Mac OSX
Linux
BSD