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

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

Methods

 ClientId.Get
 Returns the unique client ID. More...
 
 Description.Get
 Returns a textual description of the object.
 
 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...
 
 Latency.Enable
 Enables one-way latency on the HTTP Session. More...
 
 Local.Port.Get
 Returns the TCP the HTTPClientMobile will use to send its HTTPRequest. More...
 
 Local.Port.Set port
 Configure the TCP port for the client to use. More...
 
 Parent.Get
 Returns the parent object.
 
 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.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...
 
 Restart.Enable enableval
 Let the HTTP Client try to restart the session when a connection fails. More...
 
 Restart.IsEnabled
 Method which will return whether or not the HTTP Client will restart the session when the connection fails. 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...
 
 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...
 

Class overview

HTTP client application that may schedule HTTP requests to the HTTP server application.

Since
2.6.0

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).

Definition at line 12098 of file api.tcl.

Method documentation

Layer5.Http.Client.Mobile::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 HTTPClientMobile unique ID
Example
1 $HTTPClientMobile ClientId.Get

Returns:

BBhttpC800286629 

Definition at line 12112 of file api.tcl.

Layer5.Http.Client.Mobile::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 $HTTPClientMobile Http.Method.Get

Returns:

GET 

or in case of a PUT it will return Returns:

PUT 

Definition at line 12133 of file api.tcl.

Layer5.Http.Client.Mobile::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 $HTTPClientMobile Http.Method.Set Get

or in case of a PUT it will return

1 $HTTPClientMobile Http.Method.Set PUT

Definition at line 12149 of file api.tcl.

Layer5.Http.Client.Mobile::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 12163 of file api.tcl.

Layer5.Http.Client.Mobile::Latency.Enable

Enables one-way latency on the HTTP Session.

Since
2.12.12
Example
1 $HTTPClientMobile LatencyEnable 1

Definition at line 12175 of file api.tcl.

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

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

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

Returns:

49152 

Definition at line 12187 of file api.tcl.

Layer5.Http.Client.Mobile::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 $HTTPClientMobile Local.Port.Set 45780

Definition at line 12205 of file api.tcl.

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

Return the configured destination address.

Returns the current configured remote site address.

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

Returns:

10.8.255.15 

Definition at line 12224 of file api.tcl.

Layer5.Http.Client.Mobile::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 $HTTPClientMobile Remote.Address.Set 10.8.255.15

Definition at line 12240 of file api.tcl.

Layer5.Http.Client.Mobile::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 $HTTPClientMobile Remote.Port.Get

Returns:

80 

Definition at line 12254 of file api.tcl.

Layer5.Http.Client.Mobile::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 $HTTPClientMobile Remote.Port.Set 80

Definition at line 12272 of file api.tcl.

Layer5.Http.Client.Mobile::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 $HTTPClientMobile Request.Duration.Get

Returns:

1500000000 

Definition at line 12286 of file api.tcl.

Layer5.Http.Client.Mobile::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 $HTTPClientMobile Request.Duration.Set 1500ms

or expressed in nano seconds

1 $HTTPClientMobile Request.Duration.Set 1500000000

Definition at line 12310 of file api.tcl.

Layer5.Http.Client.Mobile::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 $HTTPClientMobile Request.InitialTimeToWait.Get

Returns:

60000000000 

Definition at line 12324 of file api.tcl.

Layer5.Http.Client.Mobile::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 $HTTPClientMobile Request.InitialTimeToWait.Set 60s

Initial Time to wait of 60 seconds expressed in nanoseconds

1 $HTTPClientMobile Request.InitialTimeToWait.Set 60000000000

Initial Time to wait of 60 seconds expressed in minutes

1 $HTTPClientMobile Request.InitialTimeToWait.Set 1m

Definition at line 12342 of file api.tcl.

Layer5.Http.Client.Mobile::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 $HTTPClientMobile Rate.Limit.Get

Returns:

10000000 

Definition at line 12354 of file api.tcl.

Layer5.Http.Client.Mobile::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 $HTTPClientMobile Rate.Limit.Set 10000000
Example

Disable rate limit

1 $HTTPClientMobile Rate.Limit.Set 0

Definition at line 12370 of file api.tcl.

Layer5.Http.Client.Mobile::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 12384 of file api.tcl.

Layer5.Http.Client.Mobile::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 12406 of file api.tcl.

Layer5.Http.Client.Mobile::Restart.Enable   enableval  

Let the HTTP Client try to restart the session when a connection fails.

The HTTP Client will setup a new HTTP connection when the connection is lost for some reason. Possible reasons are loss of the network connection on the device, loss of the TCP connection due to a rebooting device somewhere in the network...

To distinguish the different sessions, the ClientServerId is used as a prefix. The connection attempt number is appended to the ID

Since
2.10.0
Parameters
enableval1 to enable, 0 to disable.
Example

Enable the restarting behaviour

1 $HTTPClientMobile RestartEnable 1
Example

Enable TCP restart on a wireless endpoint and request all sessions created.

1 $httpClient RestartEnable 1
2 Rest of the test: start the device, wait for the test to be finished.
3 ...
4 
5 set sessions [ $httpServer Client.Identifiers.Get ]
6  puts $sessions
7 output: BBhttpS3212284618/BBhttpMC2196283375-1 BBhttpS3212284618/BBhttpMC2196283375-2 BBhttpS3212284618/BBhttpMC2196283375-4
8 Since there is no session with ID BBhttpS3212284618/BBhttpMC2196283375-3, it means the device has tried to setup a third session, but failed to do so

Definition at line 12437 of file api.tcl.

Layer5.Http.Client.Mobile::Restart.IsEnabled

Method which will return whether or not the HTTP Client will restart the session when the connection fails.

Returns
enableValue True if enabled, false otherwise.
Since
2.10.0
Example

Getting the configured rate limit.

1 $HTTPClientMobile Restart.IsEnabled

Returns:

1 

Definition at line 12451 of file api.tcl.

Layer5.Http.Client.Mobile::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 $HTTPClientMobile ServerClientId.Get

Returns:

BBhttpS72577556/BBhttpC800286629 

Definition at line 12465 of file api.tcl.

Layer5.Http.Client.Mobile::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 HTTPClientMobiles each running on a different server end up with the same connection ID.

Example
1 $HTTPClientMobile ServerId.Get

Returns:

BBhttpS72577556 

Definition at line 12479 of file api.tcl.

Layer5.Http.Client.Mobile::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 $HTTPClientMobile TypeOfServiceGet

Definition at line 12509 of file api.tcl.

Layer5.Http.Client.Mobile::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 $HTTPClientMobile TypeOfServiceSet 16

Definition at line 12527 of file api.tcl.