Table of Contents
Just a second...

Client types

Diffusion™ provides APIs for many languages and platforms. Some of these APIs have different levels of capability.

A client's type is a combination of the API it uses and the protocol it uses to connect to the Diffusion server.

APIs

JavaScript® Unified API
Use this API to develop browser or Node.js™ clients that can have control capabilities.
Apple® Unified API
Use this API to develop mobile clients in Objective-C that do not have control capabilities.
Android™ Unified API
Use this API to develop mobile clients in Java™ that can have control capabilities.
Java Unified API
Use this API to develop Java clients that can have control capabilities.
.NET Unified API
Use this API to develop clients in C# that can have control capabilities.
C Unified API
Use this API to develop C clients that can have control capabilities.
Publisher clients
Publisher clients are publishers deployed on a Diffusion server that connect to another Diffusion server as a client. You can use the Java Publisher API to develop a publisher.
DEPRECATED: Android Classic API
Use this API to develop mobile clients in Java that do not have control capabilities.
DEPRECATED: Silverlight® Classic API
Use this API to develop browser clients that do not have control capabilities.
DEPRECATED: Flash® Classic API
Use this API to develop browser clients in ActionScript® that do not have control capabilities.
DEPRECATED: JavaScript Classic API
You can use this API to develop browser clients that do not have control capabilities. However, we recommend that you use the Unified API instead.
DEPRECATED: Java Classic API
You can use this API to develop Java clients that do not have control capabilities. However, we recommend that you use the Unified API instead.
DEPRECATED: .NET Classic API
You can use this API to develop C# clients that do not have control capabilities. However, we recommend that you use the Unified API instead.
DEPRECATED: iOS Classic API
Use this API to develop mobile clients in Objective-C that do not have control capabilities. However, we recommend that you use the Unified API instead.
DEPRECATED: C Classic API
You can use this API to develop C clients that do not have control capabilities. However, we recommend that you use the Unified API instead.

Protocols

The following protocols, and their secure versions, are available:
WebSocket
The WebSocket implementation provides a browser-based full duplex connection, built on top of WebSocket framing. This complies with the WebSocket standards and is usable with any load balancer or proxy with support for WebSocket.
HTTP Polling
HTTP polling uses HTTP to make a long poll request. Each request remains open until a message is available. More than one message will be returned if available. A separate TCP connection is used to send messages from the client to the server.
DEPRECATED: HTTP Chunked Streaming
HTTP Chunked Streaming provides a streaming connection for messages from the server by using HTTP chunked encoding. A separate TCP connection is used to send messages from the client to the server. This provides two simplex connections, one based on request/response (upstream) and the other streaming data (downstream). This relies on HTTP/1.1 so ensure that network intermediaries such as load balancers are HTTP/1.1 aware.
DEPRECATED: DPT

The DPT protocol (Diffusion protocol over TCP) creates a TCP connection and uses it to send and receive messages in a full duplex way. Load balancers treat these connections as TCP connections.

DEPRECATED: HTTP Full Duplex
HTTP Full Duplex acts like HTTP in the initial connection handshake and acts like DPT for the exchange of messages. HTTP Full Duplex wraps the Diffusion protocol with HTTP request and response headers. Unlike true HTTP, it operates in a full duplex manner. For example, the client can send a response that does not correspond to a request.

This is acceptable to a number of network intermediaries (load balancers and firewalls), and can be a pragmatic way to communicate over a single bi-directional, end-to-end connection via intermediaries that do not accept the WebSocket.

However, we recommend that you use WebSocket instead.

Table 1. Supported protocols by client
Client WebSocket HTTP Polling DEPRECATED: DPT DEPRECATED: HTTP Full Duplex
JavaScript Unified API Supported Supported    
Apple Unified API Supported      
Android Unified API Supported Supported    
Java Unified API Supported Supported Supported Supported
.NET Unified API Supported   Supported Supported
C Unified API Supported   Supported  
Publisher client Supported   Supported Supported
1 Supported by Flash/Silverlight
2 Supported natively and by Flash
3 Recommended