# RTTP configuration

These Liberator configuration items define how Liberator handles [RTTP](liberator-rttp.md) connections with clients.

See also [http-rttp-content-type](liberator-http-configuration-part-1.md#http-rttp-content-type) in [HTTP configuration (part 1)](liberator-http-configuration-part-1.md).

## RTTP connection types

Here’s a summary of the RTTP connection types that are referred to in the descriptions of the configuration items below:

| RTTP connection type | Description | Can be used in these client types |
| --- | --- | --- |
| <a name="type-1"></a>Type 1 | Direct connection This is a direct persistent connection via TCP/IP. The client connects to the server via a TCP/IP socket, and the server streams data directly to the client across this connection. | Java clients Android clients iOS clients .NET clients |
| <a name="type-2"></a>Type 2 | HTTP streaming This is a persistent connection that uses tunneling over HTTP or HTTPS. The client connects to the server by requesting a URL. The server holds the requested page open and streams data to the client until the client closes the connection. | StreamLink Java clients StreamLink Android clients StreamLink iOS clients StreamLink.NET clients StreamLink Silverlight clients |
| <a name="type-3"></a>Type 3 | Polling The client polls the server for data, issuing a fresh HTTP or HTTPS request each time. Because the polling mechanism is relatively inefficient and resource hungry, and can increase message latency, it’s usually only used as a fallback mode when other types of connection can’t be established. | StreamLink Java clients StreamLink Android clients StreamLink.NET clients StreamLink Silverlight clients StreamLink for Browsers clients StreamLink JS clients |
| <a name="type-4"></a>Type 4 | Multipart replace | Streamlink for Browsers clients |
| <a name="type-5"></a>Type 5 | Forever frame This connection type is Intended mainly for use with applications running in Internet Explorer, but it can be used for other browsers if the browser’s server-sent events capability has been disabled. | Streamlink for Browsers clients Streamlink JS clients |
| <a name="type-8"></a>Type 8 | HTML 5 web socket | StreamLink Java clients StreamLink Android clients StreamLink iOS clients StreamLink for Browsers clients Streamlink JS clients |
| <a name="type-9"></a>Type 9 | Server-sent events | Streamlink JS clients running in Firefox or Google Chrome |

## rttp-hostname

`rttp-hostname` specifies the hostname that Liberator sends to the client when the RTTP connection is established.

**Syntax:** `rttp-hostname <hostname>`

**Type:** string

**Default value:** +[none]+

## rttp-server-name

`rttp-server-name` specifies the server-name Liberator sends to the client when the RTTP connection is established.

**Syntax:** `rttp-server-name <server-name>`

**Type:** string

**Default value:** `rttpd/<version>` where `<version>` is the Liberator version.

## rttp-type2-url

`rttp-type2-url` specifies the URL that an RTTP client requests when it wishes to make an RTTP [type 2](#type-2) (HTTP streaming) connection.

**❗ IMPORTANT**\
You shouldn’t normally need to set this configuration item. Changing it from the default setting is likely to prevent [StreamLink](../streamlink/index.md) clients from communicating with Liberator.

**Syntax:** `rttp-type2-url <url-selecting-RTTP-type2-connection>`

**Type:** string

**Default value:** `/RTTP-TYPE2`

## rttp-type3-timeout

`rttp-type3-timeout` specifies the timeout in seconds of the HTTP connection for a [type 3](#type-3) (polling) RTTP connection. Each type 3 connection is mapped to a pool of HTTP connections that form the backchannel for a type3 session. An HTTP connection times out after `rttp-type3-timeout` seconds if there’s been no activity on the connection during this period. If this happens, the session remains in place and a new HTTP connection is assigned to it if the activity recommences.

**Syntax:** `rttp-type3-timeout <timeout-in-seconds>`

**Type:** float

**Default value:** `10.0` seconds

## rttp-type3-url

`rttp-type3-url` specifies specifies the URL that an RTTP client requests when it wishes to make an RTTP [type 3](#type-3) (polling) RTTP connection.

**❗ IMPORTANT**\
You shouldn’t normally need to set this configuration item. Changing it from the default setting is likely to prevent [StreamLink](../streamlink/index.md) clients from communicating with Liberator.

**Syntax:** `rttp-type3-url <url-selecting-RTTP-type3-connection>`

**Type:** string

**Default value:** `/RTTP-TYPE3`

## rttp-type4-url

`rttp-type4-url` specifies specifies the URL that an RTTP client requests when it wishes to make an RTTP [type 4](#type-4) (multipart replace) RTTP connection.

**❗ IMPORTANT**\
You shouldn’t normally need to set this configuration item. Changing it from the default setting is likely to prevent [StreamLink](../streamlink/index.md) clients from communicating with Liberator.

**Syntax:** `rttp-type4-url <url-selecting-RTTP-type4-connection>`

**Type:** string

**Default value:** `/RTTP-TYPE4`

## rttp-type5-js

`rttp-type5-js` specifies the directory path and filename of the JavaScript file for [type 5](#type-5) (forever frame) RTTP connections used in StreamLink for Browsers. When Liberator receives a request for a type 5 connection from a StreamLink for Browsers client, it serves this Javascript file up to the client, which then executes the code in the file to enable correct operation of the type 5 connection.

**❗ IMPORTANT**\
You shouldn’t normally need to set this configuration item. Changing it from the default setting will prevent [StreamLink](../streamlink/index.md) clients that use SteamLink for Browsers from communicating with Liberator.

**📌 NOTE**\
StreamLink for Browsers is deprecated in favour of StreamLink JS. See [`rttp-type5-sljs-js`](#rttp-type5-sljs-js).

**Syntax:** `rttp-type5-js <directory-path-and-filename>`

**Type:** string

**Default value:** `/sl4b/javascript-rttp-provider/streaming-type5.js`

## rttp-type5-pad-length

`rttp-type5-pad-length` specifies the header padding in bytes for [type 5](#type-5) (forever frame) RTTP connections.

**Syntax:** `rttp-type5-pad-length <header-padding-in-bytes>`

**Type:** integer

**Default value:** `4096` bytes

## rttp-type5-sljs-js

`rttp-type5-sljs-js` specifies specifies the directory path and filename of the JavaScript file for [type 5](#type-5) (forever frame) RTTP connections used in StreamLink JS. When Liberator receives a request for a type 5 connection from a StreamLink JS client, it serves this Javascript file up to the client, which then executes the code in the file to enable correct operation of the type 5 connection.

**❗ IMPORTANT**\
You shouldn’t normally need to set this configuration item. Changing it from the default setting is likely to prevent [StreamLink](../streamlink/index.md) clients that use StreamlInk JS from communicating with Liberator.

**Syntax:** `rttp-type5-sljs-js <directory-path-and-filename>`

**Type:** string

**Default value:** `/sljs/foreverframe.js`

## rttp-type5-url

`rttp-type5-url` specifies specifies the URL that an RTTP client requests when it wishes to make an RTTP [type 5](#type-5) (forever frame) RTTP connection.

**❗ IMPORTANT**\
You shouldn’t normally need to set this configuration item. Changing it from the default setting is likely to prevent [StreamLink](../streamlink/index.md) clients from communicating with Liberator.

**Syntax:** `rttp-type5-url <url-selecting-RTTP-type5-connection>`

**Type:** string

**Default value:** `/RTTP-TYPE5`

## rttp-type9-url

`rttp-type9-url` specifies specifies the URL that an RTTP client requests when it wishes to make an RTTP [type 9](#type-9) (server sent events) RTTP connection.

**❗ IMPORTANT**\
You shouldn’t normally need to set this configuration item. Changing it from the default setting is likely to prevent [StreamLink](../streamlink/index.md) clients from communicating with Liberator.

**Syntax:** `rttp-type9-url <url-selecting-RTTP-type9-connection>`

**Type:** string

**Default value:** `/RTTP-TYPE9`

## rttp-websocket-url

`rttp-websocket-url` specifies specifies the URL that an RTTP client requests when it wishes to make an RTTP connection that uses HTML5 web sockets (also known as a [type 8](#type-8) connection).

**❗ IMPORTANT**\
You shouldn’t normally need to set this configuration item. Changing it from the default setting is likely to prevent [StreamLink](../streamlink/index.md) clients from communicating with Liberator.

**Syntax:** `rttp-websocket-url <url-selecting-websocket-connection>`

**Type:** string

**Default value:** `/RTTP-TYPE8`

---

**See also:**

* Reference: [HTTP configuration](liberator-http-configuration-part-1.md)
* Reference: [HTTPS configuration](liberator-https-configuration.md)
