PerServerBandwidthLimit Property

Object: SoftArtisans.FileUp
Syntax: PerServerBandwidthLimit[= Kilobytes As Long]
Type: Long
Read/Write: Read/Write
Description:

This property, when used in conjunction with the TransferFile method for downloads, will limit the server-side total output to a specific bandwidth.

If PerServerBandwidthLimit is set, the total speed of the server's output for all connections combined will not exceed the designated limit. If this limit is exceeded, each connection will get a proportion of bandwidth based on the total bandwidth available, divided by the number of current connections. By default, PerServerBandwidthLimit is set to 0, meaning no effect. This property is set in kilobytes.

Note: PerServerBandwidthLimit is implemented on NT4 with IIS4 or higher, and Windows 2000.
Examples:
ASP <%
'--- Create an instance of SoftArtisans FileUp
Set fileDownload = Server.CreateObject(SoftArtisans.FileUp)

'--- Set the server-side bandwidth limit to
'--- 1000 KB for all connections combined
fileDownload.PerServerBandwidthLimit = 1000

'--- Start the download
fileDownload.TransferFile "C:\MyServerDir\filename.doc"
%>
C# //--- Create an instance of SoftArtisans FileUp
FileUp fileDownload = new FileUp(Context);

//--- Set the server-side bandwidth limit to
//--- 1000 KB for all connections combined
fileDownload.PerServerBandwidthLimit = 1000;

//--- Start the download
fileDownload.TransferFile("C:\MyServerDir\filename.doc");
VB.NET '--- Create an instance of SoftArtisans FileUp
Dim fileDownload As New FileUp(Context)

'--- Set the server-side bandwidth limit to
'--- 1000 KB for all connections combined
fileDownload.PerServerBandwidthLimit = 1000

'--- Start the download
fileDownload.TransferFile("C:\MyServerDir\filename.doc")

Copyright © 2010 SoftArtisans, Inc. All rights reserved.