Members
-
<static, readonly> AddressType
-
Enum containing possible Address types.
Properties:
Name Type Default Description GLOBAL
1 The address is a standard global internet address LOCAL
2 The address is a site local address. The address is part of the IP subset that is reserved for private networks. LOOPBACK
3 The address is assigned to the server loopback interface UNKNOWN
4 The address type is unknown -
<static, readonly> ClientType
-
Enum containing possible client types.
Properties:
Name Type Default Description JAVASCRIPT_BROWSER
0 JavaScript client JAVASCRIPT_FLASH
1 JavaScript client, using a Flash transport bridge JAVASCRIPT_SILVERLIGHT
2 JavaScript client, using a Silverlight transport bridge ANDROID
3 Android client IOS
4 iOS client J2ME
5 J2ME client. Includes Blackberry clients FLASH
6 Flash client SILVERLIGHT
7 Silverlight client JAVA
8 Java client DOTNET
9 .NET client C
10 C INTERNAL
11 Internal Diffusion client OTHER
12 Client type is not known to the local session, possibly because the remote client is using a different version of Diffusion -
<static, readonly> CloseReason :CloseReason
-
Enum representing the reason that the session has been closed.
Type:
Properties:
Name Type Default Description CLOSED_BY_CLIENT
CloseReason The session has been closed by the client. CLOSED_BY_SERVER
CloseReason The session has been closed by the server, or another session using the session.clients feature. RECONNECT_ABORTED
CloseReason Whilst disconnected, the client explicitly aborted a reconnect attempt/ CONNECTION_TIMEOUT
CloseReason The connection attempt timed out. HANDSHAKE_REJECTED
CloseReason The connection handshake was rejected by the server. HANDSHAKE_ERROR
CloseReason There was an error parsing the handshake response - usually indicative of incompatible protocol versions. TRANSPORT_ERROR
CloseReason There was an unexpected error with the network connection. CONNECTION_ERROR
CloseReason A connection to the server was unable to be established. IDLE_CONNECTION
CloseReason The client detected that the connection was idle. LOST_MESSAGES
CloseReason Message loss after reconnection has been detected. ACCESS_DENIED
CloseReason The connection attempt failed due to a security restraint. Example
diffusion.connect({...}).then(function(session) {...}, function(err) { switch(err) { case diffusion.clients.CloseReason.CLOSED_BY_CLIENT: // Do something case diffusion.clients.CloseReason.ACCESS_DENIED: // Do something else ... } });
-
<static, readonly> DetailType
-
Enum containing possible Session Detail types.
Properties:
Name Type Default Description SUMMARY
0 LOCATION
1 CONNECTOR_NAME
2 SERVER_NAME
3 -
<static, readonly> PropertyKeys
-
Enum containing standard session property keys
Properties:
Name Type Default Description ALL_FIXED_PROPERTIES
["*F"] This constant can be used instead of a property key in requests for session property values to indicate that all fixed session properties are required. ALL_USER_PROPERTIES
["*U"] This constant can be used instead of a property key in requests for session property values to indicate that all user defined session properties are required. ALL_PROPERTIES
["*F","*U"] This constant can be used instead of a property key in requests for session property values to indicate that all session properties are required. Examples
// Get the ALL_FIXED_PROPERTIES key var props = diffusion.clients.PropertyKeys.ALL_FIXED_PROPERTIES;
// Get all user and fixed properties var props = diffusion.clients.PropertyKeys.ALL_FIXED_PROPERTIES .concat(diffusion.clients.PropertyKeys.ALL_USER_PROPERTIES);
-
<static, readonly> TransportType
-
Enum containing possible Transport types.
Properties:
Name Type Default Description WEBSOCKET
0 WebSocket protocol HTTP_LONG_POLL
1 HTTP long polling transport IFRAME_LONG_POLL
2 HTTP long poll, via HTML iFrame elements IFRAME_STREAMING
3 HTTP 1.1 chunked transfer via HTML iFrame elements DPT
4 Diffusion protocol based on TCP sockets HTTPC
5 Diffusion protocol based on HTTP 1.1 chunked transfer HTTPC_DUPLEX
6 Diffusion protocol based on HTTP 1.1 chunked transfer OTHER
7 Transport type is not known to the local session, possible because the remote client is using a different version of Diffusion