# StreamLink connection types

StreamLink supports six streaming connection types.

## Connection types

The table below lists the different ways that StreamLink can establish a streaming connection with Liberator:

**StreamLink connection types**

| # | Connection&#160;Type | Description |
| :-: | --- | --- |
| 1 | Direct | Persistent TCP/IP connection. No encapsulating protocol. |
| 2 | HTTP | Persistent HTTP/1.1 connection. |
| 3 | Polling | Short polling |
| 5 | Forever Frame | Persistent HTTP/1.1 connection with chunked transfer encoding in a hidden `iframe` element. |
| 8 | WebSocket | [WebSocket](https://en.wikipedia.org/wiki/WebSocket) connection. |
| 9 | Server-Sent Events (SSE) | [Server-Sent Events](https://en.wikipedia.org/wiki/Server-sent_events) connection. |

Support for connection types is platform dependent:

**Connection-type support: StreamLink JS**

|  | WebSocket | Server&#160;Sent&#160;Events | Forever&#160;Frame | Polling |
| --- | :-: | :-: | :-: | :-: |
| StreamLink JS #(on MS IE)# | icon:check[]^1^ | #icon:remove[]# | icon:check[] | icon:check[] |
| StreamLink JS #(on MS Edge &lt; 79)# | icon:check[]^1^ | #icon:remove[]# | #icon:remove[]# | icon:check[] |
| StreamLink JS #(on MS Edge >= 79)# | icon:check[]^1^ | icon:check[]^2^ | icon:check[] | icon:check[] |
| StreamLink JS #(on Chrome)# | icon:check[]^1^ | icon:check[]^2^ | icon:check[] | icon:check[] |
| StreamLink JS #(on Firefox)# | icon:check[]^1^ | icon:check[]^2^ | icon:check[] | icon:check[] |

**Connection type support: Java, Android, C, .NET, and iOS**

|  | Direct | WebSocket | HTTP&#160;Socket | Polling |
| --- | :-: | :-: | :-: | :-: |
| StreamLink Java | icon:check[] | icon:check[]^3^ | icon:check[] | icon:check[] |
| StreamLink Android | icon:check[] | icon:check[]^3^ | icon:check[] | icon:check[] |
| StreamLink C | icon:check[] | icon:check[]^3^ | icon:check[] | icon:check[] |
| StreamLink .NET | icon:check[] | icon:check[]^4^ | icon:check[] | icon:check[] |
| StreamLink iOS | icon:check[] | icon:check[]^3^ | icon:check[] | icon:check[] |

1. For more information on WebSocket support in web browsers, see [Can I use ... WebSockets?](https://caniuse.com/#search=websockets)
2. For more information on Server Sent Events (SSE) support in web browsers, see [Can I use ... Server Sent Events?](https://caniuse.com/#search=server%20sent%20events)
3. WebSocket compression not supported (see Liberator’s [http-extensions](../liberator/liberator-http-configuration-part-1.md#http-extensions) configuration item)
4. WebSocket support in StreamLink.NET requires StreamLink.NET 7.1 or above.

Each new release of StreamLink JS is tested on the latest versions of Microsoft Internet Explorer, Microsoft Edge, Google Chrome, and Mozilla Firefox available at the time of testing. For the list of web browsers on which a specific release of StreamLink JS was tested, see the release notes for that release.

**📌 NOTE**\
StreamLink JS has a different browser support policy to Caplin web applications. Browsers supported by StreamLink JS may not be supported by Caplin web applications.

## Specifying the connection type in a Liberator URL

StreamLink determines which connection type to use to connect to a Liberator from the Liberator’s URL:

| URL | Connection type(s) |
| --- | --- |
| tcp://... | Direct connection. Not supported by StreamLink JS. |
| tcps://... | Direct connection over SSL. Not supported by StreamLink JS. |
| <span>http://</span>... | On StreamLink JS, a meta-URL that expands to the following URLs in descending order of priority (highest priority first): . SSE over HTTP (if supported by the web browser) . Forever Frame over HTTP On all other StreamLink clients: . HTTP socket |
| <span>https://</span>... | On StreamLink JS, a meta-URL that expands to the following URLs in descending order of priority (highest priority first): . SSE over HTTPS (if supported by the web browser) . Forever Frame over HTTPS All other StreamLink clients: . HTTPS socket |
| ws://... | WebSocket connection to Liberator’s HTTP port |
| wss://... | Secure WebSocket connection to Liberator’s HTTPS port |
| poll://... | Short polling over HTTP |
| polls://... | Short polling over HTTPS |
| rttp://... | A meta-URL that expands to the following URLs in descending order of priority (highest priority first): . ws://...^1^ . <span>http://</span>... . poll://... |
| rttps://... | A meta-URL that expands to the following URLs in descending order of priority (highest priority first): . wss://...^1^ . <span>https://</span>... . polls://... |

1. StreamLink .NET supports the WebSocket connection type from StreamLink .NET 7.1

---

**See also**:

* [Configure how Liberator handles HTTP connections](../liberator/liberator-configure-how-liberator-handles-http-connections.md)
* [Configure how Liberator handles HTTPS connections](../liberator/liberator-configure-how-liberator-handles-https-connections.md)
* [Configure how Liberator handles direct connections](../liberator/liberator-configure-how-liberator-handles-direct-client-connections.md)
* [Can I use ... WebSockets?](https://caniuse.com/#search=websockets)
* [Can I use ... Server Sent Events?](https://caniuse.com/#search=server%20sent%20events)
