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

HTTP server application that handles incoming HTTP requests with the correct URL format by returning a document of the appropriate size. More...

Methods

 Client.Identifiers.Get
 Returns the list of known identifiers of HTTP clients which made a connection to this server. More...
 
 Description.Get
 Returns a textual description of the object.
 
 HasSession
 Returns whether or not a client session exists with the given server-client-identifier. 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.Session.Info.Get clientID
 Returns the Layer5.Http.SessionInfo from this session. More...
 
 InitialWindowSize.Get
 Gets the initial receive window for the server. More...
 
 InitialWindowSize.Set windowsize
 Sets the initial receive window for the server. 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.
 
 Port.Get
 Returns the configured TCP port for the HTTP server. More...
 
 Port.Set port
 Configures the TCP port on which the HTTP server will listen. More...
 
 RcvWindowScale.Get
 Returns the current receive window scale. More...
 
 RcvWindowScale.Set scale
 Configures the window scale which will be used for new clients. More...
 
 ReceiveWindow.InitialSize.Get
 Gets the initial receive window for the server. More...
 
 ReceiveWindow.InitialSize.Set windowsize
 Sets the initial receive window for the server. More...
 
 ReceiveWindow.Scaling.Enable scaling
 Enables of disables windowscaling. More...
 
 ReceiveWindow.Scaling.IsEnabled
 Returns if window scaling 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 new clients. More...
 
 SessionStorage.Enable
 
 SessionStorage.IsEnabled
 
 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...
 
 Start
 Starts the HTTP server on the configured port with the configured configuration. More...
 
 Status.Get
 Returns the HTTP server status. More...
 
 Stop
 Stops the HTTP server. More...
 
 Tcp.CongestionAvoidance.Algorithm.Get
 Gets the current configured TCP Congestion Avoidance Algorithm for new clients. More...
 
 Tcp.CongestionAvoidance.Algorithm.Set congestionAvoidanceAlgorithm
 Selects the TCP Congestion Avoidance Algorithm. 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.
 
 WindowScaling.Enable scaling
 Enables of disables windowscaling. More...
 
 WindowScaling.Get
 Returns if window scaling is enabled or not. More...
 

Class overview

HTTP server application that handles incoming HTTP requests with the correct URL format by returning a document of the appropriate size.

Definition at line 16230 of file api.tcl.

Method documentation

Layer5.Http.Server::Client.Identifiers.Get

Returns the list of known identifiers of HTTP clients which made a connection to this server.

Returns
List of Client Identifiers which have connected this server. TclByteBlowerHTTPClient::ServerClientIdGet
Example
1 $httpServer Client.Identifiers.Get

Returns:

BBhttpS3808538043/BBhttpC4042826775 BBhttpS1545014205/BBhttpC2187284405 BBhttpS856132709/BBhttpC3531898846 

Definition at line 16242 of file api.tcl.

Layer5.Http.Server::HasSession

Returns whether or not a client session exists with the given server-client-identifier.

Returns
1
We have a session
0
We don't have a session
TclByteBlowerHTTPClient::ServerClientIdGet
Example
1 $httpServer HasSession [ $httpClient ServerClientId.Get ]

Returns:

1 

Definition at line 16259 of file api.tcl.

Layer5.Http.Server::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 $httpServer History.Sampling.BufferLength.Get

Returns:

6 

Definition at line 16271 of file api.tcl.

Layer5.Http.Server::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.

Note
This setting will only be used on new HTTP sessions. When the session history settings must be changed, the settings must be set on the HTTP Session object.
Example
1 $httpServer History.Sampling.BufferLength.Set 10

Definition at line 16285 of file api.tcl.

Layer5.Http.Server::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 $httpServer History.Sampling.Interval.Duration.Get

Returns:

1000000000 

Definition at line 16297 of file api.tcl.

Layer5.Http.Server::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.

Note
This setting will only be used on new HTTP sessions. When the session history settings must be changed, the settings must be set on the HTTP Session object.
Example
1 $httpServer History.Sampling.Interval.Duration.Set 500ms

Definition at line 16311 of file api.tcl.

Layer5.Http.Server::Http.Session.Info.Get   clientID  

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

Parameters
clientIDID of the client which has connected with this server. This ID can be retrieved from the Layer5.Http.Client::ServerClientId.Get method on the HTTPClient. Warning, call Layer5.Http.Server::HasSession to verify that the client session exists, before calling this function. Otherwise, an exception may be thrown.
Returns
Layer5.Http.SessionInfo
Exceptions
ByteBlower.Exception.API.ConfigErrorwhen the HTTP Server did not setup the given HTTP session (e.g. when the TCP connection failed)
Example
1 $httpServer Http.Session.Info.Get BBhttpS72577556/BBhttpC2009875244

Returns:

<Layer5.Http.SessionInfo object> 

Definition at line 16329 of file api.tcl.

Layer5.Http.Server::InitialWindowSize.Get

Gets the initial receive window for the server.

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

Exceptions
ByteBlower.Exception.InvalidValue.Integerwhen the value is not an Integer
Deprecated:
Use Layer5.Http.Server::ReceiveWindow.InitialSize.Get
Example
1 $httpServer InitialWindowSize.Get

Definition at line 16345 of file api.tcl.

Layer5.Http.Server::InitialWindowSize.Set   windowsize  

Sets the initial receive window for the server.

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
Deprecated:
Use Layer5.Http.Server::ReceiveWindow.InitialSize.Set
Example
1 $httpServer InitialWindowSize.Set 65535

Definition at line 16363 of file api.tcl.

Layer5.Http.Server::MaximumSegmentSize.Get

Returns the configured TCP maximum segment size.

The default value is 65535.

Example
1 $httpClient MaximumSegmentSize.Set 65535

Definition at line 16375 of file api.tcl.

Layer5.Http.Server::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 16389 of file api.tcl.

Layer5.Http.Server::Port.Get

Returns the configured TCP port for the HTTP server.

Returns
The configured TCP Port
Example
1 $httpServer Port.Get

Returns:

42365 

Definition at line 16406 of file api.tcl.

Layer5.Http.Server::Port.Set   port  

Configures the TCP port on which the HTTP server will listen.

Parameters
portThe TCP port on which the HTTP server will listen for incoming 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 $httpServer Port.Set 80

Definition at line 16422 of file api.tcl.

Layer5.Http.Server::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.

Deprecated:
the Layer5.Http.Server::ReceiveWindow.Scaling.Value.Set method
Returns
current receive window scale
Default value: 3
Example
1 $httpServer RcvWindowScale.Get

Returns:

3 

Definition at line 16440 of file api.tcl.

Layer5.Http.Server::RcvWindowScale.Set   scale  

Configures the window scale which will be used for new clients.

Note
This must be done before requesting a page from a client, 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.

Parameters
scaleInteger (0-8), which is used for bitwise shifting.
Default value: 3
Exceptions
ByteBlower.Exception.InvalidValue.Integerwhen the value is not an integer
Deprecated:
please use the Layer5.Http.Server::ReceiveWindow.Scaling.Value.Set method
Example
1 $httpServer RcvWindowScale.Set 3

Definition at line 16462 of file api.tcl.

Layer5.Http.Server::ReceiveWindow.InitialSize.Get

Gets the initial receive window for the server.

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

Exceptions
ByteBlower.Exception.InvalidValue.Integerwhen the value is not an Integer
Example
1 $httpServer ReceiveWindow.InitialSize.Get

Definition at line 16476 of file api.tcl.

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

Sets the initial receive window for the server.

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 $httpServer ReceiveWindow.InitialSize.Set 65535

Definition at line 16492 of file api.tcl.

Layer5.Http.Server::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 >0 ) or disable ( false or 0 ) windowscaling. Following values can be used:
Exceptions
ByteBlower.Exception.InvalidValuewhen the value is not an integer or true or false
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 16508 of file api.tcl.

Layer5.Http.Server::ReceiveWindow.Scaling.IsEnabled

Returns if window scaling 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
Example
1 $httpServer ReceiveWindow.Scaling.IsEnabled

When enabled: Returns:

1 

When disabled: Returns:

0 

Definition at line 16522 of file api.tcl.

Layer5.Http.Server::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.

Returns
current receive window scale
Default value: 3
Example
1 $httpServer ReceiveWindow.Scaling.Value.Get

Returns:

3 

Definition at line 16538 of file api.tcl.

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

Configures the window scale which will be used for new clients.

This must be done before requesting a page from a client, 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.

Parameters
scaleInteger (0-8), which is used for bitwise shifting.
Default value: 3
Exceptions
ByteBlower.Exception.InvalidValue.Integerwhen the value is not an integer
Example
1 $httpServer ReceiveWindow.Scaling.Value.Set 3

Definition at line 16558 of file api.tcl.

Layer5.Http.Server::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
Slow-start threshold
Default value: 65535
Example
1 $httpServer SlowStartThreshold.Get

Returns:

65535 

Definition at line 16584 of file api.tcl.

Layer5.Http.Server::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 $httpServer SlowStartThreshold.Set 1000000

Definition at line 16604 of file api.tcl.

Layer5.Http.Server::Start

Starts the HTTP server on the configured port with the configured configuration.

Example
1 $httpServer Start

Definition at line 16614 of file api.tcl.

Layer5.Http.Server::Status.Get

Returns the HTTP server status.

Returns
Running
The HTTP server is active
Stopped
The HTTP server is not running
Error
Error occurred while initializing
Unknown
The server status code is not known to the client
Example

Before starting the HTTP server:

1 $httpServer Status.Get

{stopped} After starting the HTTP server:

1 $httpServer Status.Get

{running}

Definition at line 16626 of file api.tcl.

Layer5.Http.Server::Stop

Stops the HTTP server.

Running sessions will be stopped and new requests will be ignored.

Example
1 $httpServer Stop

Definition at line 16638 of file api.tcl.

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

Gets the current configured TCP Congestion Avoidance Algorithm for new clients.

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

Returns:

sack 

Definition at line 16652 of file api.tcl.

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

Selects the TCP Congestion Avoidance Algorithm.

Selects the TCP Congestion Avoidance Algorithm which will be used for new clients. This must be selected before requesting a page from a client, because for some algorithms, the congestion avoidance support is negotiated a the beginning of the TCP session.

Parameters
congestionAvoidanceAlgorithmCongestion Avoidance Algorithm to configure.
  • none
  • sack
  • newreno
  • sack-with-cubic
  • newreno-with-cubic
Default value: None
Exceptions
<tcl_error>Failed to parse enumerator: When the value could not be interpreted as a valid TCAA
Example

Configure NewReno as congestionAvoidance Algorithm

1 $httpServer Tcp.CongestionAvoidance.Algorithm.Set newreno

Configure Sack as congestionAvoidance Algorithm

1 $httpServer Tcp.CongestionAvoidance.Algorithm.Set sack

Configure None as congestionAvoidance Algorithm

1 $httpServer Tcp.CongestionAvoidance.Algorithm.Set none

Definition at line 16670 of file api.tcl.

Layer5.Http.Server::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 $httpServer Tcp.History.Sampling.BufferLength.Get

Returns:

6 

Definition at line 16682 of file api.tcl.

Layer5.Http.Server::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.

Note
This setting will only be used on new HTTP sessions. When the session history settings must be changed, the settings must be set on the HTTP Session object.
Example
1 $httpServer Tcp.History.Sampling.BufferLength.Set 10

Definition at line 16696 of file api.tcl.

Layer5.Http.Server::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 $httpServer Tcp.History.Sampling.Interval.Duration.Get

Returns:

1000000000 

Definition at line 16708 of file api.tcl.

Layer5.Http.Server::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.

Note
This setting will only be used on new HTTP sessions. When the session history settings must be changed, the settings must be set on the HTTP Session object.
Example
1 $httpServer Tcp.History.Sampling.Interval.Duration.Set 500ms

Definition at line 16722 of file api.tcl.

Layer5.Http.Server::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 >0 ) or disable ( false or 0 ) windowscaling. Following values can be used:
Exceptions
ByteBlower.Exception.InvalidValuewhen the value is not an integer or true or false
Deprecated:
Use Layer5.Http.Server::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 16752 of file api.tcl.

Layer5.Http.Server::WindowScaling.Get

Returns if window scaling 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.Server::ReceiveWindow.Scaling.IsEnabled
Example
1 $httpServer WindowsScaling.Get

When enabled: Returns:

1 

When disabled: Returns:

0 

Definition at line 16768 of file api.tcl.