All Classes Namespaces Files Functions Pages
Layer5.Http.Client Class Reference

HTTP client application that may schedule HTTP requests to real webservers or the HTTP server application. More...

Methods

 Capture.Clear
 Delete any captured data. More...
 
 Capture.Disable
 Disable the capture of the HTTPData. More...
 
 Capture.Enable
 Enable the capture of the HTTPData. More...
 
 Capture.Get
 Return the captured HTTP Data. More...
 
 ClientId.Get
 Returns the unique client ID. More...
 
 Description.Get
 Returns a textual description of the object.
 
 ErrorMessage.Get
 Returns the error message. More...
 
 Finished.Get
 Returns whether or not the HTTP session has finished. More...
 
 FlowLabel.Get
 Returns the configured "Flow Label" for IPv6 flows. More...
 
 FlowLabel.Set
 Configures the flow label for IPv6 flows. More...
 
 HasError
 Returns true if an error has occurred. More...
 
 HasSession
 Returns whether or not we have a HTTP session. More...
 
 History.Sampling.BufferLength.Get
 Gets the default Sampling Buffer Length for the HTTP Session history. More...
 
 History.Sampling.BufferLength.Set
 Sets the default Sampling Buffer Length for the HTTP Session history. More...
 
 History.Sampling.Interval.Duration.Get
 Gets the default Sampling interval for the HTTP Session history. More...
 
 History.Sampling.Interval.Duration.Set
 Sets the default Sampling interval for the HTTP Session history. More...
 
 Http.Method.Get
 Returns the used HTTPRequest method. More...
 
 Http.Method.Set
 Configures the HTTPRequest method to be used. More...
 
 Http.Session.Info.Get
 Returns the Layer5.Http.SessionInfo from this session. More...
 
 InitialWindowSize.Get
 Gets the initial receive window for the client. More...
 
 InitialWindowSize.Set windowsize
 Sets the initial receive window for the client. More...
 
 Latency.Enable
 
 Local.Port.Get
 Returns the TCP the httpclient will use to send its HTTPRequest. More...
 
 Local.Port.Set port
 Configure the TCP port for the client to use. More...
 
 MaximumSegmentSize.Get
 Returns the configured TCP maximum segment size. More...
 
 MaximumSegmentSize.Set size
 Sets the TCP maximum segment size. More...
 
 Parent.Get
 Returns the parent object.
 
 RcvWindowScale.Get
 Returns the current receive window scale. More...
 
 RcvWindowScale.Set scale
 Configures the window scale which will be used for the client. More...
 
 ReceiveWindow.InitialSize.Get
 Gets the initial receive window for the client. More...
 
 ReceiveWindow.InitialSize.Set windowsize
 Sets the initial receive window for the client. More...
 
 ReceiveWindow.Scaling.Enable scaling
 Enables of disables windowscaling. More...
 
 ReceiveWindow.Scaling.IsEnabled
 Returns if windowscaling is enabled or not. More...
 
 ReceiveWindow.Scaling.Value.Get
 Returns the current receive window scale. More...
 
 ReceiveWindow.Scaling.Value.Set scale
 Configures the window scale which will be used for the client. More...
 
 Refresh
 
 Remote.Address.Get
 Return the configured destination address. More...
 
 Remote.Address.Set address
 Configure the destination address. More...
 
 Remote.Port.Get
 Returns the configured destination port. More...
 
 Remote.Port.Set port
 Configure the TCP port which the client will use as destination port. More...
 
 Request.Duration.Get
 Method which will return the configured HTTP Request duration. More...
 
 Request.Duration.Set requestDuration
 Method which will configure a page to send out an HTTP Request to transmit data during a certain time. More...
 
 Request.InitialTimeToWait.Get
 Returns the initial time to wait before a scheduled Request starts. More...
 
 Request.InitialTimeToWait.Set timeToWait
 Sets the initial time to wait before really requesting a page (for a scheduled Request). More...
 
 Request.Page.Get
 Method which will get the HTML page which will be requested. More...
 
 Request.Page.Set pageName
 Method which will set the HTML page which will be requested. More...
 
 Request.RateLimit.Get
 Method which will return the configured rate-limit of the HTTP traffic. More...
 
 Request.RateLimit.Set rateLimit
 Method which will limit the rate of the HTTP traffic to a certain amount.. More...
 
 Request.Size.Get
 Method which will return the configured requested pagesize expressed in Bytes. More...
 
 Request.Size.Set requestSize
 Method which will configure a page to send out an HTTP Request to request a certain number of Bytes. More...
 
 Request.Start.Type.Get
 Returns the current configured Start Type. More...
 
 Request.Start.Type.Set startType
 Configures the Start Type of a HTTP Request. More...
 
 Request.Start
 Start the current configured HTTP Request. More...
 
 Request.Status.Get
 Returns the status of the HTTP request. More...
 
 Request.Stop
 This will stop the client. More...
 
 Request.Uri.Get
 Returns the requested URI. More...
 
 Request.Uri.Set uri
 Method which will set the URI, it contains the complete HTTP URI which will be requested. More...
 
 ServerClientId.Get
 This method returns the combination of the server Id ( aka ByteBlower Server Id ) and client Id. More...
 
 ServerId.Get
 Returns the unique ByteBlower Server ID. More...
 
 SlowStartThreshold.Get
 Returns the initial slow-start threshold value used by TCP. More...
 
 SlowStartThreshold.Set ssthresh
 Set the initial slow-start threshold value used by TCP. More...
 
 Tcp.CongestionAvoidance.Algorithm.Get
 Gets the current configured TCP Congestion Avoidance Algorithm. More...
 
 Tcp.CongestionAvoidance.Algorithm.Set congestionAvoidanceAlgorithm
 Selects the used TCP Congestion Avoidance Algorithm (TCAA). More...
 
 Tcp.History.Sampling.BufferLength.Get
 Gets the default Sampling Buffer Length for the TCP Session history. More...
 
 Tcp.History.Sampling.BufferLength.Set
 Sets the default Sampling Buffer Length for the TCP Session history. More...
 
 Tcp.History.Sampling.Interval.Duration.Get
 Gets the default Sampling interval for the TCP Session history. More...
 
 Tcp.History.Sampling.Interval.Duration.Set
 Sets the default Sampling interval for the TCP Session history. More...
 
 Tcp.Prague.Enable
 Enables TCP Prague congestion control for L4S.
 
 Tcp.Prague.IsEnabled
 Returns if TCP Prague congestion control is enabled or not.
 
 TypeOfService.Get
 Retrieves the 'Type Of Service' or 'Traffic Class' configuration of the IP layer. More...
 
 TypeOfService.Set
 Configures the 'Type Of Service' or 'Traffic Class' used at the IP layer. More...
 
 WaitUntilConnected Timeout
 Waits until connection is established or timeout has expired. More...
 
 WaitUntilFinished Timeout
 Waits until request is finished or timeout has expired. More...
 
 WindowScaling.Enable scaling
 Enables of disables windowscaling. More...
 
 WindowScaling.Get
 Returns if windowscaling is enabled or not. More...
 

Class overview

HTTP client application that may schedule HTTP requests to real webservers or the HTTP server application.

Using this class, you can simulate TCP (Transmission Control Protocol) traffic The TCP is simulated by a HTML request to the HTTPServer. This is the HttpClient that will perform the GET or the PUT. This request can be sent to the HttpServerObject (Layer5.Http.Server) or even a real HTTPServer.

Definition at line 12537 of file api.tcl.

Method documentation

Layer5.Http.Client::Capture.Clear

Delete any captured data.

Example
1 $httpClient Capture.Clear

Definition at line 12547 of file api.tcl.

Layer5.Http.Client::Capture.Disable

Disable the capture of the HTTPData.

Example
1 $httpClient Capture.Disable

Definition at line 12557 of file api.tcl.

Layer5.Http.Client::Capture.Enable

Enable the capture of the HTTPData.

Example
1 $httpClient Capture.Enable

Definition at line 12567 of file api.tcl.

Layer5.Http.Client::Capture.Get

Return the captured HTTP Data.

Returns
<Layer5.Http.CapturedHttpData object>
Example
1 $httpClient Capture.Get

Returns:

<Layer5.Http.CapturedHttpData object> 

Definition at line 12579 of file api.tcl.

Layer5.Http.Client::ClientId.Get

Returns the unique client ID.

Each client has a unique ID so that information about the same connection can be requested on a HTTP server object. This method returns the unique ClientID for this HTTP client.

Returns
the httpclient unique ID
Example
1 $httpClient ClientId.Get

Returns:

BBhttpC800286629 

Definition at line 12593 of file api.tcl.

Layer5.Http.Client::ErrorMessage.Get

Returns the error message.

When the request status is "Error" then extra information can be obtained with this method.

Returns
The error message string
Example
1 $httpClient ErrorMessage.Get

Returns:

"TCP connection attempt timed out" 

Definition at line 12612 of file api.tcl.

Layer5.Http.Client::Finished.Get

Returns whether or not the HTTP session has finished.

Returns
1
Finished (with or without error)
0
Not Finished
Example

Check if the client is finished

1 $httpClient Finished.Get

Returns:

1 

Definition at line 12624 of file api.tcl.

Layer5.Http.Client::FlowLabel.Get

Returns the configured "Flow Label" for IPv6 flows.

Since
2.7.0

This feature only affects IPv6 flows. It is ignored for IPv4 flows.

Example
1 $httpClient FlowLabel.Get

Definition at line 12638 of file api.tcl.

Layer5.Http.Client::FlowLabel.Set

Configures the flow label for IPv6 flows.

Since
2.7.0

This feature only affects IPv6 flows. It is ignored for IPv4 flows.

Example
1 $httpClient FlowLabel.Set 1234

Definition at line 12652 of file api.tcl.

Layer5.Http.Client::HasError

Returns true if an error has occurred.

Returns
1
An error has occurred
0
No error has occurred
Example
1 $httpClient HasError

Returns:

0 

Definition at line 12664 of file api.tcl.

Layer5.Http.Client::HasSession

Returns whether or not we have a HTTP session.

Returns
1
We have a session
0
We don't have a session
Example
1 $httpClient HasSession

Returns:

1 

Definition at line 12676 of file api.tcl.

Layer5.Http.Client::History.Sampling.BufferLength.Get

Gets the default Sampling Buffer Length for the HTTP Session history.

The history on the HTTP Session History object can be configured when the session is started. This method allows to configure the HTTP Session History before the request is started and has thus the advantage not to invalidate previous history items.

Example
1 $httpClient History.Sampling.BufferLength.Get

Returns:

6 

Definition at line 12688 of file api.tcl.

Layer5.Http.Client::History.Sampling.BufferLength.Set

Sets the default Sampling Buffer Length for the HTTP Session history.

The history on the HTTP Session History object can be configured when the session is started. This method allows to configure the HTTP Session History before the request is started and has thus the advantage not to invalidate previous history items.

This function is only allowed when the HTTP Session is not running yet. When the HTTP Session is running, the history must be configured on the HTTP Session object.

Example
1 $httpClient History.Sampling.BufferLength.Set 10

Definition at line 12702 of file api.tcl.

Layer5.Http.Client::History.Sampling.Interval.Duration.Get

Gets the default Sampling interval for the HTTP Session history.

The history on the HTTP Session History object can be configured when the session is started. This method allows to configure the HTTP Session History before the request is started and has thus the advantage not to invalidate previous history items.

Example
1 $httpClient History.Sampling.Interval.Duration.Get

Returns:

1000000000 

Definition at line 12714 of file api.tcl.

Layer5.Http.Client::History.Sampling.Interval.Duration.Set

Sets the default Sampling interval for the HTTP Session history.

The history on the HTTP Session History object can be configured when the session is started. This method allows to configure the HTTP Session History before the request is started and has thus the advantage not to invalidate previous history items.

This function is only allowed when the HTTP Session is not running yet. When the HTTP Session is running, the history must be configured on the HTTP Session object.

Example
1 $httpClient History.Sampling.Interval.Duration.Set 500ms

Definition at line 12728 of file api.tcl.

Layer5.Http.Client::Http.Method.Get

Returns the used HTTPRequest method.

There are 2 possible values:

GET
The HTTP Request method will be a GET.
PUT
The HTTP Request method will be a PUT.
Default value: GET
Returns
The current selected HTTP request method
Example
1 $httpClient Http.Method.Get

Returns:

GET 

or in case of a PUT it will return Returns:

PUT 

Definition at line 12744 of file api.tcl.

Layer5.Http.Client::Http.Method.Set

Configures the HTTPRequest method to be used.

There are 2 possible values:

GET
The HTTP Request method will be a GET.
PUT
The HTTP Request method will be a PUT.
Default value: GET
Exceptions
<tcl_error>bad lexical cast: When the value could not be interpreted as a valid HTTPRequestMethod
Example
1 $httpClient Http.Method.Set Get

or in case of a PUT it will return

1 $httpClient Http.Method.Set PUT

Definition at line 12760 of file api.tcl.

Layer5.Http.Client::Http.Session.Info.Get

Returns the Layer5.Http.SessionInfo from this session.

The HttpSessionInfo contains all the information of the current session. From state until the counters of received/transmitted bytes

Returns
Layer5.Http.SessionInfo
Example
1 $httpClient HttpSessionInfo.Get

Returns:

<Layer5.Http.SessionInfo object> 

Definition at line 12774 of file api.tcl.

Layer5.Http.Client::InitialWindowSize.Get

Gets the initial receive window for the client.

Small windowsizes can decrease the performance of a TCP session. Please use a good size for your configuration and network setup.

Deprecated:
Use Layer5.Http.Client::ReceiveWindow.InitialSize.Get
Default value: 65535
Returns
The configured initial receive window size.
Example
1 $httpClient InitialWindowSize.Get

Returns:

65535 

Definition at line 12792 of file api.tcl.

Layer5.Http.Client::InitialWindowSize.Set   windowsize  

Sets the initial receive window for the client.

Small windowsizes can decrease the performance of a TCP session. Please use a good size for your configuration and network setup.

Parameters
windowsizeNew value of the initial receive window.
Deprecated:
Use Layer5.Http.Client::ReceiveWindow.InitialSize.Set
Exceptions
ByteBlower.Exception.InvalidValue.Integerwhen the value is not an Integer
Example
1 $httpClient InitialWindowSize.Set 65535

Definition at line 12810 of file api.tcl.

Layer5.Http.Client::Local.Port.Get

Returns the TCP the httpclient will use to send its HTTPRequest.

Returns
The TCP port the client uses.
Example
1 $httpClient Local.Port.Get

Returns:

49152 

Definition at line 12827 of file api.tcl.

Layer5.Http.Client::Local.Port.Set   port  

Configure the TCP port for the client to use.

This method will set the TCP port for the client.

Parameters
portTCP port on which the client will listen or replies and send its requests.
Exceptions
ByteBlower.Exception.InvalidValue.Integerwhen the value is not an Integer
ByteBlower.Exception.InvalidConfigwhen the value is not between 1 and 65535
Example
1 $httpClient Local.Port.Set 45780

Definition at line 12845 of file api.tcl.

Layer5.Http.Client::MaximumSegmentSize.Get

Returns the configured TCP maximum segment size.

The default value is 65535.

Example
1 $httpClient MaximumSegmentSize.Get

Definition at line 12857 of file api.tcl.

Layer5.Http.Client::MaximumSegmentSize.Set   size  

Sets the TCP maximum segment size.

This option specifies an upper bound on the TCP segment size.

Parameters
sizeMaximum segment size. Should be between 1 and 65535.
Example
1 $httpClient MaximumSegmentSize.Set 65535

Definition at line 12871 of file api.tcl.

Layer5.Http.Client::RcvWindowScale.Get

Returns the current receive window scale.

The TCP window scale option is an option to increase the receive window size allowed in Transmission Control Protocol above its former maximum value of 65,535 bytes. This TCP option, along with several others, is defined in IETF RFC 1323.

Default value: 3
Deprecated:
Use the Layer5.Http.Client::ReceiveWindow.Scaling.Value.Get method
Returns
the current receive window scale
Example
1 $httpClient RcvWindowScale.Get

Returns:

3 

Definition at line 12894 of file api.tcl.

Layer5.Http.Client::RcvWindowScale.Set   scale  

Configures the window scale which will be used for the client.

Note
This must be done before requesting the page, because this option is negotiated at the beginning of the TCP session.

The TCP window scale option is an option to increase the receive window size allowed in Transmission Control Protocol above its former maximum value of 65,535 bytes. This TCP option, along with several others, is defined in IETF RFC 1323.

Exceptions
ByteBlower.Exception.InvalidValue.Integerwhen the value is not an Integer
Parameters
scaleInteger (0-14), which is used for bitwise shifting.
Deprecated:
Use the Layer5.Http.Client::ReceiveWindow.Scaling.Value.Set method
Default value: 3
Example
1 $httpClient RcvWindowScale.Set 4

Definition at line 12916 of file api.tcl.

Layer5.Http.Client::ReceiveWindow.InitialSize.Get

Gets the initial receive window for the client.

Small windowsizes can decrease the performance of a TCP session. Please use a good size for your configuration and network setup.

Default value: 65535
Returns
The configured initial receive window size.
Example
1 $httpClient ReceiveWindow.InitialSize.Get

Returns:

65535 

Definition at line 12932 of file api.tcl.

Layer5.Http.Client::ReceiveWindow.InitialSize.Set   windowsize  

Sets the initial receive window for the client.

Small windowsizes can decrease the performance of a TCP session. Please use a good size for your configuration and network setup.

Parameters
windowsizeNew value of the initial receive window.
Exceptions
ByteBlower.Exception.InvalidValue.Integerwhen the value is not an Integer
Example
1 $httpClient ReceiveWindow.InitialSize.Set 65535

Definition at line 12948 of file api.tcl.

Layer5.Http.Client::ReceiveWindow.Scaling.Enable   scaling  

Enables of disables windowscaling.

Windowscaling allows windowsizes to grow further than 65,536 bytes. For high speed or high latency links, window scaling should be enabled for a good throughput.

Parameters
scalingBoolean which will enable ( true ) or disable ( false ) windowscaling.
Exceptions
ByteBlower.Exception.InvalidValuewhen the value is not an integer or true or false
Default value: true
Example

To enable window scaling

1 $httpClient ReceiveWindow.Scaling.Enable 1

or

1 $httpClient ReceiveWindow.Scaling.Enable true

To disable window scaling

1 $httpClient ReceiveWindow.Scaling.Enable 0

or

1 $httpClient ReceiveWindow.Scaling.Enable false

Definition at line 12966 of file api.tcl.

Layer5.Http.Client::ReceiveWindow.Scaling.IsEnabled

Returns if windowscaling is enabled or not.

Windowscaling allows windowsizes to grow further than 65,536 bytes. For high speed or high latency links, window scaling should be enabled for a good throughput.

Returns
1
window scale enabled
0
window scale disabled
Default value: true
Example
1 $httpClient ReceiveWindow.Scaling.IsEnabled

When enabled: Returns:

1 

When disabled: Returns:

0 

Definition at line 12982 of file api.tcl.

Layer5.Http.Client::ReceiveWindow.Scaling.Value.Get

Returns the current receive window scale.

The TCP window scale option is an option to increase the receive window size allowed in Transmission Control Protocol above its former maximum value of 65,535 bytes. This TCP option, along with several others, is defined in IETF RFC 1323.

Default value: 3
Returns
the current receive window scale
Example
1 $httpClient ReceiveWindowScaling.Value.Get

Returns:

3 

Definition at line 12998 of file api.tcl.

Layer5.Http.Client::ReceiveWindow.Scaling.Value.Set   scale  

Configures the window scale which will be used for the client.

Note
This must be done before requesting the page, because this option is negotiated at the beginning of the TCP session.
Exceptions
ByteBlower.Exception.InvalidValue.Integerwhen the value is not an Integer
ByteBlower.Exception.API.ConfigErrorwhen the value is not in the range 0-8
Parameters
scaleInteger (0-8), which is used for bitwise shifting.
Default value: 3
Example
1 $httpClient ReceiveWindow.Scaling.Value.Set 4

Definition at line 13018 of file api.tcl.

Layer5.Http.Client::Remote.Address.Get

Return the configured destination address.

Returns the current configured remote site address.

Returns
destination address
Example
1 $httpClient Remote.Address.Get

Returns:

10.8.255.15 

Definition at line 13037 of file api.tcl.

Layer5.Http.Client::Remote.Address.Set   address  

Configure the destination address.

Method to configure the address of the HTTP server which this client will try to contact.

Note
Be aware that only addresses are used, no DNS is supported at this moment.
Parameters
addressAddress of the HTTP server this client will use.
Example
1 $httpClient Remote.Address.Set 10.8.255.15

Definition at line 13053 of file api.tcl.

Layer5.Http.Client::Remote.Port.Get

Returns the configured destination port.

This method returns the current configured TCP port of the HTTP server which this client will try to contact.

Returns
the remote (destination) tcp port
Example
1 $httpClient Remote.Port.Get

Returns:

80 

Definition at line 13067 of file api.tcl.

Layer5.Http.Client::Remote.Port.Set   port  

Configure the TCP port which the client will use as destination port.

This method is used to configure the TCP port of the server which the client will try to contact.

Parameters
portTCP port of the HTTP server which the client will try to contact.
Exceptions
ByteBlower.Exception.InvalidValue.Integerwhen the value is not an Integer
ByteBlower.Exception.InvalidConfigwhen the value is not between 1 and 65535
Example

Configure the client to use port 80 as destination port

1 $httpClient Remote.Port.Set 80

Definition at line 13085 of file api.tcl.

Layer5.Http.Client::Request.Duration.Get

Method which will return the configured HTTP Request duration.

A HTTP Request page will be configured to request to send data, during a certain time, on a ByteBlower HTTP server.

Returns
The HTTP request duration.
Example

Get the configured a request duration 1.5 seconds

1 $httpClient Request.Duration.Get

Returns:

1500000000 

Definition at line 13099 of file api.tcl.

Layer5.Http.Client::Request.Duration.Set   requestDuration  

Method which will configure a page to send out an HTTP Request to transmit data during a certain time.

A HTTP Request page will be configured to request to send data, during a certain time, on a ByteBlower HTTP server.

This will prepare a nice TCP traffic test with data transferred over the network until the requested duration has passed.

Note
The HTTP Method that is used for the Request can be configured using Layer5.Http.Client::Http.Method.Set The HTTP Method defines the way the data traffic will flow.
The Start Type that is used for the Request can be configured using Layer5.Http.Client::Request.Start.Type.Set The Start Type defines when the HTTP Request will start.
The generated HTTP Request URI format is specific for a ByteBlower HTTP Server.
Parameters
requestDurationThe duration of data traffic to send the HTTP Request for.
Exceptions
<tcl_error>bad lexical cast: When the value could not be interpreted as a valid time string
Example

will configure a request to transfer data during 1.5 seconds

1 $httpClient Request.Duration.Set 1500ms

or expressed in nano seconds

1 $httpClient Request.Duration.Set 1500000000

Definition at line 13123 of file api.tcl.

Layer5.Http.Client::Request.InitialTimeToWait.Get

Returns the initial time to wait before a scheduled Request starts.

Returns
The initial time to wait before a scheduled request starts. Units are ns
Default value: 0
Example
1 $httpClient Request.InitialTimeToWait.Get

Returns:

60000000000 

Definition at line 13137 of file api.tcl.

Layer5.Http.Client::Request.InitialTimeToWait.Set   timeToWait  

Sets the initial time to wait before really requesting a page (for a scheduled Request).

This can be used if you want to start different request on different timestamps.

Parameters
timeToWaitTime to wait before the request will be really sent. Units are ns, but can be added.
Default value: 0
Exceptions
<tcl_error>bad lexical cast: When the value could not be interpreted as a valid time string
Example

Initial Time to wait of 60 seconds

1 $httpClient Request.InitialTimeToWait.Set 60s

Initial Time to wait of 60 seconds expressed in nanoseconds

1 $httpClient Request.InitialTimeToWait.Set 60000000000

Initial Time to wait of 60 seconds expressed in minutes

1 $httpClient Request.InitialTimeToWait.Set 1m

Definition at line 13155 of file api.tcl.

Layer5.Http.Client::Request.Page.Get

Method which will get the HTML page which will be requested.

If you are requesting on a ByteBlower HTTP Server, please check Layer5.Http.Client::Request.Size.Set and Layer5.Http.Client::Request.Duration.Set for specialized HTTP Requests

Method which will set the HTML page which will be requested. When Layer5.Http.Client::Request.Start is called, the HTTP Client will send a HTTP Request message for this page and will listen for a response.

A typical use in ByteBlower is a request for a certain size to a ByteBlower HTTP server. e.g. 10000000.html This will give us a nice TCP traffic test with the number of requested Bytes transferred over the network.

Returns
the HTML page name that will be requested
Note
The HTTP Method that is used for the Request can be configured using Layer5.Http.Client::Http.Method.Set The HTTP Method defines the way the data traffic will flow.
The Start Type that is used for the Request can be configured using Layer5.Http.Client::Request.Start.Type.Set The Start Type defines the way the data traffic will flow.
Example

Setting the client to request for the page: 100000.html

1 $httpClient Request.Page.Set 100000.html
2  $httpClient Request.Page.Get

Returns:

100000.html 

Definition at line 13178 of file api.tcl.

Layer5.Http.Client::Request.Page.Set   pageName  

Method which will set the HTML page which will be requested.

If you are requesting on a ByteBlower HTTP Server, please check Layer5.Http.Client::Request.Size.Set and Layer5.Http.Client::Request.Duration.Set for specialized HTTP Requests

Method which will set the HTML page which will be requested. When Layer5.Http.Client::Request.Start is called, the HTTP Client will send a HTTP Request message for this page and will listen for a response.

A typical use in ByteBlower is a request for a certain size to a ByteBlower HTTP server. e.g. 10000000.html This will give us a nice TCP traffic test with the number of requested Bytes transferred over the network.

Note
The HTTP Method that is used for the Request can be configured using Layer5.Http.Client::Http.Method.Set The HTTP Method defines the way the data traffic will flow.
The Start Type that is used for the Request can be configured using Layer5.Http.Client::Request.Start.Type.Set The Start Type defines the way the data traffic will flow.
Parameters
pageNameThe page to send the HTTP Request for.
Example

Setting the client to request for the page: 100000.html

1 $httpClient Request.Page.Set 100000.html

Definition at line 13200 of file api.tcl.

Layer5.Http.Client::Request.RateLimit.Get

Method which will return the configured rate-limit of the HTTP traffic.

Returns
rateLimit The rate limit, in bytes per second.
Example

Getting the configured rate limit.

1 $httpClient Rate.Limit.Get

Returns:

10000000 

Definition at line 13212 of file api.tcl.

Layer5.Http.Client::Request.RateLimit.Set   rateLimit  

Method which will limit the rate of the HTTP traffic to a certain amount..

Parameters
rateLimitThe rate limit, in bytes per second.
Example

Setting the rate limit to 10 MBytesps

1 $httpClient Rate.Limit.Set 10000000
Example

Disable rate limit

1 $httpClient Rate.Limit.Set 0

Definition at line 13228 of file api.tcl.

Layer5.Http.Client::Request.Size.Get

Method which will return the configured requested pagesize expressed in Bytes.

Returns
The configured requested pagesize in Bytes

A HTTP Request page will be configured to request for a certain size of data on a ByteBlower HTTP server.

Example

Getting the configured requestsize

1 $httpClient Request.Size.Get

Returns:

10000000 

Definition at line 13242 of file api.tcl.

Layer5.Http.Client::Request.Size.Set   requestSize  

Method which will configure a page to send out an HTTP Request to request a certain number of Bytes.

A HTTP Request page will be configured to request for a certain size of data on a ByteBlower HTTP server.

This will prepare a nice TCP traffic test with the number of requested Bytes transferred over the network.

Note
The HTTP Method that is used for the Request can be configured using Layer5.Http.Client::Http.Method.Set The HTTP Method defines the way the data traffic will flow.
The Start Type that is used for the Request can be configured using Layer5.Http.Client::Request.Start.Type.Set The Start Type defines when the HTTP Request will start.
The generated HTTP Request URI format is specific for a ByteBlower HTTP Server.
Parameters
requestSizeThe number of Bytes to send the HTTP Request for.
Example

Setting the requestsize to 10000000 Bytes

1 $httpClient Request.Size.Set 10000000

Definition at line 13264 of file api.tcl.

Layer5.Http.Client::Request.Start

Start the current configured HTTP Request.

The Start Type can be configured using Layer5.Http.Client::Request.Start.Type.Set

Configuring the Request is done using Layer5.Http.Client::Request.Size.Set and Layer5.Http.Client::Request.Duration.Set

Exceptions
ByteBlower.Exception.API.ConfigErrorThis exception is thrown when some configurations are incorrect. For example if the RemoteAddress is an IPv6 address and the HTTPClient has a IPv4 address.
Example
1 $httpClient StatusValue.Get

Returns:

BBhttpS72577556/BBhttpC800286629 

Definition at line 13312 of file api.tcl.

Layer5.Http.Client::Request.Start.Type.Get

Returns the current configured Start Type.

Returns the current configured Start Type for a HTTP Request. There are 2 possible values:

direct
will send out the HTTP Request as soon as a 'Page', 'Size' or 'Duration' is requested.
scheduled
will send out the HTTP Request ('Page', 'Size' or 'Duration') as soon as soon as the ByteBlower Port starts sending.
Default value: direct
Returns
Configured start type: direct or scheduled
Example

On a httpClient with direct starttype

1 $httpClient Request.Start.Type.Get

Returns:

direct 

On a httpClient with a scheduled starttype

1 $httpClient Request.Start.Type.Get

Returns:

scheduled 

Definition at line 13280 of file api.tcl.

Layer5.Http.Client::Request.Start.Type.Set   startType  

Configures the Start Type of a HTTP Request.

Configures the Start Type of a HTTP Request. There are 2 possible values:

direct
will send out the HTTP Request as soon as a 'Page', 'Size' or 'Duration' is requested.
scheduled
will send out the HTTP Request ('Page', 'Size' or 'Duration') as soon as soon as the ByteBlower Port starts sending.
Parameters
startTypeStart Type of the HTTP request. Must be 'direct' or 'scheduled'.
Default value: direct
Example

Setting the startype to direct

1 $httpClient Request.Start.Type.Set direct

Setting the startype to scheduled

1 $httpClient Request.Start.Type.Set scheduled

use Request.InitialTimeToWait.Set to configure the schedule

Definition at line 13296 of file api.tcl.

Layer5.Http.Client::Request.Status.Get

Returns the status of the HTTP request.

Returns
configuration
initial state in which the configuration takes place
scheduled
during the initial time to wait of a scheduled request
connecting
while trying to establish a connection
running
while the connection is established and before http request has completed
finished
after the http request has completed
stopped
after the user stopped the request
error
if an error occurred while trying to connect or while running
Example
1 $httpClient Request.Status.Get

Returns:

configuration 

Definition at line 13324 of file api.tcl.

Layer5.Http.Client::Request.Stop

This will stop the client.

Example
1 $httpClient Request.Stop

Definition at line 13334 of file api.tcl.

Layer5.Http.Client::Request.Uri.Get

Returns the requested URI.

Returns the URI like it is or will be requested by the client.

Returns
HTTP Request URI as configured by Layer5.Http.Client::Request.Uri.Set
Example
1 $httpClient Request.Uri.Get

Returns:

? 

Definition at line 13348 of file api.tcl.

Layer5.Http.Client::Request.Uri.Set   uri  

Method which will set the URI, it contains the complete HTTP URI which will be requested.

When Layer5.Http.Client::Request.Start is called, the HTTP Client will send a HTTP Request message for this page and will listen for a response.

Different from the Layer5.Http.Client::Request.Page.Set method, this method allows you to configure a HTTP Request to external (non-ByteBlower) HTTP servers without adding the 'server-client-id' to the HTTP Request page's path. Configuring the URI will also configure the HTTP Server address and HTTP Server TCP to which the HTTP Request is sent.

Note
DNS resolution is not supported for the URI, so the HTTP Server needs to be an IPv4 or IPv6 address.
Parameters
uriThe URI the httpClient must request.
Example

configure the HTTP Client to send a request to HTTP Server 1.1.1.1, on the default TCP port 80, for page '/test/index.html'

1 $httpClient Request.Uri.Set
2 http://1.1.1.1/test/index.html

configure the HTTP Client to send a request to HTTP Server 10.10.10.2, on TCP port 8080, for page '/project/index.html'

1 $httpClient Request.Uri.Set
2 http://10.10.10.2:8080/project/index.html

Definition at line 13368 of file api.tcl.

Layer5.Http.Client::ServerClientId.Get

This method returns the combination of the server Id ( aka ByteBlower Server Id ) and client Id.

This returns a combination of the ServerId and the Client Id. This combination will identify a HTTP connection. It is this combination of id's you can use to request the Layer5.Http.SessionInfo on the HTTP server (Layer5.Http.Server::Http.Session.Info.Get)

Returns
The combined server- and client Id
Example
1 $httpClient ServerClientId.Get

Returns:

BBhttpS72577556/BBhttpC800286629 

Definition at line 13382 of file api.tcl.

Layer5.Http.Client::ServerId.Get

Returns the unique ByteBlower Server ID.

Returns
The ByteBlower server unique ID.

Each ByteBlower server has a unique ID. This identifier stays persistant over the lifetime of the ByteBlowerServers ( changed when rebooted ). This serverId together with the clientId identifies a HTTPConnection. By adding those 2 id's together it is unlikely that 2 httpclients each running on a different server end up with the same connection ID.

Example
1 $httpClient ServerId.Get

Returns:

BBhttpS72577556 

Definition at line 13396 of file api.tcl.

Layer5.Http.Client::SlowStartThreshold.Get

Returns the initial slow-start threshold value used by TCP.

The slow-start threshold indicates when the slow-start phase ends and the congestion avoidance phase starts. Consider increasing this value if you find that TCP takes a long time to reach peak throughput. See RFC 5681 "TCP Congestion Control" for more information on this topic.

Returns
slowstart threshold
Default value: 65535
Example
1 $httpClient SlowStartThreshold.Get

Returns:

65535 

Definition at line 13412 of file api.tcl.

Layer5.Http.Client::SlowStartThreshold.Set   ssthresh  

Set the initial slow-start threshold value used by TCP.

The slow-start threshold indicates when the slow-start phase ends and the congestion avoidance phase starts. Consider increasing this value if you find that TCP takes a long time to reach peak throughput. See RFC 5681 "TCP Congestion Control" for more information on this topic.

Parameters
ssthreshNew value for the slow-start threshold
Exceptions
ByteBlower.Exception.InvalidValuewhen the value is not a positive integer
Default value: 65535
Example

To set slow-start threshold to 1000000

1 $httpClient SlowStartThreshold.Set 1000000

Definition at line 13430 of file api.tcl.

Layer5.Http.Client::Tcp.CongestionAvoidance.Algorithm.Get

Gets the current configured TCP Congestion Avoidance Algorithm.

Returns
current Congestion Avoidance Algorithm. Possible values are:
  • none
  • sack
  • newreno
  • sack-with-cubic
  • newreno-with-cubic
Default value: None
Example
1 $httpClient Tcp.CongestionAvoidance.Algorithm.Get

Returns:

sack 

Definition at line 13444 of file api.tcl.

Layer5.Http.Client::Tcp.CongestionAvoidance.Algorithm.Set   congestionAvoidanceAlgorithm  

Selects the used TCP Congestion Avoidance Algorithm (TCAA).

This must be selected before requesting the page, because for some algorithms, the congestion avoidance support is negotiated a the beginning of the TCP session.

Parameters
congestionAvoidanceAlgorithmCongestion Avoidance Algorithm to configure. Possible values are:
  • none
  • sack
  • newreno
  • sack-with-cubic
  • newreno-with-cubic
Default value: None
Exceptions
ByteBlower.Exception.API.ConfigErrorInvalid TCP congestion avoidance algorithm: When the value could not be interpreted as a valid TCAA
Example

Configure NewReno as congestionAvoidance Algorithm

1 $httpClient Tcp.CongestionAvoidance.Algorithm.Set newreno

Configure Sack as congestionAvoidance Algorithm

1 $httpClient Tcp.CongestionAvoidance.Algorithm.Set sack

Configure None as congestionAvoidance Algorithm

1 $httpClient Tcp.CongestionAvoidance.Algorithm.Set none

Definition at line 13462 of file api.tcl.

Layer5.Http.Client::Tcp.History.Sampling.BufferLength.Get

Gets the default Sampling Buffer Length for the TCP Session history.

The history on the TCP Session History object can be configured when the session is started. This method allows to configure the TCP Session History before the request is started and has thus the advantage not to invalidate previous history items.

Example
1 $httpClient Tcp.History.Sampling.BufferLength.Get

Returns:

6 

Definition at line 13474 of file api.tcl.

Layer5.Http.Client::Tcp.History.Sampling.BufferLength.Set

Sets the default Sampling Buffer Length for the TCP Session history.

The history on the TCP Session History object can be configured when the session is started. This method allows to configure the TCP Session History before the request is started and has thus the advantage not to invalidate previous history items.

This function is only allowed when the HTTP Session is not running yet. When the HTTP Session is running, the history must be configured on the TCP Session object.

Example
1 $httpClient Tcp.History.Sampling.BufferLength.Set 10

Definition at line 13488 of file api.tcl.

Layer5.Http.Client::Tcp.History.Sampling.Interval.Duration.Get

Gets the default Sampling interval for the TCP Session history.

The history on the TCP Session History object can be configured when the session is started. This method allows to configure the TCP Session History before the request is started and has thus the advantage not to invalidate previous history items.

Example
1 $httpClient Tcp.History.Sampling.Interval.Duration.Get

Returns:

1000000000 

Definition at line 13500 of file api.tcl.

Layer5.Http.Client::Tcp.History.Sampling.Interval.Duration.Set

Sets the default Sampling interval for the TCP Session history.

The history on the TCP Session History object can be configured when the session is started. This method allows to configure the TCP Session History before the request is started and has thus the advantage not to invalidate previous history items.

This function is only allowed when the HTTP Session is not running yet. When the HTTP Session is running, the history must be configured on the TCP Session object.

Example
1 $httpClient Tcp.History.Sampling.Interval.Duration.Set 500ms

Definition at line 13514 of file api.tcl.

Layer5.Http.Client::TypeOfService.Get

Retrieves the 'Type Of Service' or 'Traffic Class' configuration of the IP layer.

Since
2.5.0

Both IP headers reserve space to for an the expected quality of service(QOS) field. In IPv4 this field is called the 'Type Of Service'. IPv6 uses the term 'Traffic Class'. Despite naming, they are both 8 bits wide. For ease of use, the getter is generic, it is used for both IPv4 and IPv6 layers.

This method returns a number from 0 up to 255. This value represents the the byte used at the IP layer.

Returns
The byte value of the 'Type Of Service' or 'Traffic Class' field. The default value is 0.
Example
1 $httpClient TypeOfService.Get

Definition at line 13544 of file api.tcl.

Layer5.Http.Client::TypeOfService.Set

Configures the 'Type Of Service' or 'Traffic Class' used at the IP layer.

Since
2.5.0

Both IP headers reserve space to specify the expected quality of service(QOS). IPv4 calls this field the 'Type Of Service'. In IPv6 one uses the term 'Traffic Class'. Despite naming, they are both 8 bits wide. For ease of use, the method is generic, it is used for both IPv4 and IPv6 layers. The implementaion will configure the proper header.

The input accepts integers from 0 up to 255. This value will be directly used in byte-sized field at the IP layer. No additional coding is performed.

This method can be called solely during the configuration phase,thus before the parent ByteBlower port is started. Invoking the method at other moments will result in error.

Example
1 $httpClient TypeOfService.Set 16

Definition at line 13562 of file api.tcl.

Layer5.Http.Client::WaitUntilConnected   Timeout  

Waits until connection is established or timeout has expired.

Valid states in which this method may be called: scheduled, connecting, running and finished.

Returns true immediately when called from running or finished states.

Returns false if timeout expired before running state was reached.

Throws config error if called from configuration or stopped state.

When called from error state or if error state is reached while waiting then the server-side exception that caused the error state will be rethrown here.

Parameters
TimeoutHow long we should wait before giving up (and returning false).
Example
1 $httpClient WaitUntilConnected 10s

Definition at line 13584 of file api.tcl.

Layer5.Http.Client::WaitUntilFinished   Timeout  

Waits until request is finished or timeout has expired.

Valid states in which this method may be called: scheduled, connecting, running and finished.

Returns true immediately when called from finished state.

Returns false if timeout expired before finished state was reached.

Throws config error if called from configuration or stopped state.

When called from error state or if error state is reached while waiting then the server-side exception that caused the error state will be rethrown here.

Parameters
TimeoutHow long we should wait before giving up (and returning false).
Example
1 $httpClient WaitUnitilFinished 60s

Definition at line 13606 of file api.tcl.

Layer5.Http.Client::WindowScaling.Enable   scaling  

Enables of disables windowscaling.

Windowscaling allows windowsizes to grow further than 65,536 bytes. For high speed or high latency links, window scaling should be enabled for a good throughput.

Parameters
scalingBoolean which will enable ( true ) or disable ( false ) windowscaling.
Exceptions
ByteBlower.Exception.InvalidValuewhen the value is not an integer or true or false
Deprecated:
Use Layer5.Http.Client::ReceiveWindow.Scaling.Enable
Example

To enable window scaling

1 $httpClient WindowScaling.Enable 1

or

1 $httpClient WindowScaling.Enable true

To disable window scaling

1 $httpClient WindowScaling.Enable 0

or

1 $httpClient WindowScaling.Enable false

Definition at line 13624 of file api.tcl.

Layer5.Http.Client::WindowScaling.Get

Returns if windowscaling is enabled or not.

Windowscaling allows windowsizes to grow further than 65,536 bytes. For high speed or high latency links, window scaling should be enabled for a good throughput.

Returns
1
window scale enabled
0
window scale disabled
Deprecated:
Use Layer5.Http.Client::ReceiveWindow.Scaling.IsEnabled
Example
1 $httpClient WindowsScaling.Get

When enabled: Returns:

1 

When disabled: Returns:

0 

Definition at line 13640 of file api.tcl.