WebSetSpeed Function

Action

Sets the simulation speed. The simulation uses short wait periods between transfers of small data packets. Packeting emulates the behavior of a modem or ISDN terminal.

Include file

WebAPI.bdh

Syntax

WebSetSpeed(in nSpeed       : number,
            in nFlag        : number optional,
            in bDuplex      : boolean optional,
            in fCompression : float optional): boolean;

Return value

  • true if successful

  • false otherwise

Parameter Description
nSpeed

Can be a [bit/sec] number or one of the following values:

  • WEB_SPEED_14. 14.4 kBit/sec

  • WEB_SPEED_28. 28.8 kBit/sec

  • WEB_SPEED_33. 33.6 kBit/sec

  • WEB_SPEED_56. 56 kBit/sec

  • WEB_SPEED_64. 64 kBit/sec

  • WEB_SPEED_128. 128 kBit/sec

  • WEB_SPEED_DSL. 384 kBit/sec

  • WEB_SPEED_T1. 1540 kBit/sec

  • WEB_SPEED_MAX. maximum possible speed

nFlag

Specifies whether the given speed should be simulated for sending or for receiving data, or for both (optional). This parameter can be any combination of the following values:

  • WEB_SPEED_SEND. Sets the simulation speed for sending data.

  • WEB_SPEED_RECV. Sets the simulation speed for receiving data.

By default, the simulation speed is set for both sending and receiving data.

bDuplex Specifies whether send and receive operations can perform simultaneously or not (optional). By default, this value is set to false.
fCompression Specifies the hardware compression rate of the simulated network device (optional). By default, this value is set to 1.0.

Example

dcltrans
  transaction TWebInit
  begin
    WebSetSpeed(WEB_SPEED_28);
    WebDumpSettings();
  end TWebInit;

Sample scripts

WebMulti01.bdf, WebMultiClientIpAddresses01.bdf