Lightstreamer macOS Client  1.2.5
Native macOS Client library for Lightstreamer
Class Methods | Properties | List of all members
LSConnectionInfo Class Reference

The LSConnectionInfo class collects the parameters related to a connection request to Lightstreamer Server. More...

#import <LSConnectionInfo.h>

Inheritance diagram for LSConnectionInfo:

Class Methods

(NSUInteger) + maxConcurrentSessionsPerServer
 Returns the maximum number of streaming connections that can be concurrently open to the same Lightstreamer Server end-point (that is: host name and port). More...
 
(void) + setMaxConcurrentSessionsPerServer:
 Sets the maximum number of streaming connections that can be concurrently open to the same Lightstreamer Server end-point (that is: host name and port). More...
 
(LSConnectionInfo *) + connectionInfoWithPushServerURL:pushServerControlURL:user:password:adapter:
 Creates and retuns an LSConnectionInfo object with the specified connection parameters. More...
 

Properties

NSString * pushServerURL
 Lightstreamer Server URL, without the path part. More...
 
NSString * pushServerControlURL
 Lightstreamer Server URL (without the path part) to be used for control requests. More...
 
NSString * user
 User name to be supplied to the Server in the connection request. More...
 
NSString * password
 User password to be supplied to the Server in the connection request. More...
 
NSString * adapter
 ID of the Adapter Set to be used to handle all requests in the session. More...
 
BOOL streamSenseEnabled
 If YES, enables the Stream-sense feature, which means that in case a streaming connection can't ben opened it will automatically failback to polling mode. More...
 
BOOL controlLinkHandlingEnabled
 If YES, enables the automatic handling of the server address in order to bypass the load balancer server (if any) after the first connection and allow the cleanest communication possible between Lightstreamer client and server. More...
 
LSConnectionConstraintsconstraints
 Constraints to be applied on the overall data flow from the Connection. More...
 
NSTimeInterval probeTimeoutSecs
 Timeout for activity checks, expressed in seconds. More...
 
NSTimeInterval probeWarningSecs
 Timeout for activity check warnings, expressed in seconds. More...
 
NSTimeInterval keepaliveSecs
 Keepalive time requested for the stream connection, in seconds. More...
 
NSTimeInterval reconnectionTimeoutSecs
 The maximum elapsed time in seconds allowed for a successful reconnection attempt. More...
 
NSTimeInterval streamingTimeoutSecs
 The maximum elapsed time in seconds allowed for the first successful streaming connection attempt on a streaming session. More...
 
NSTimeInterval retryDelaySecs
 The number of seconds to wait since a disconnection before trying a new connection, from the second reconnection attempt on. More...
 
NSTimeInterval firstRetryMaxDelaySecs
 The maximum number of seconds to wait since a disconnection before trying a new connection, for the first reconnection attempt only. More...
 
int contentLength
 The length to be used by the Server for the response body on a stream connection (a minimum length, however, is ensured by the server). More...
 
NSTimeInterval pollingSecs
 Time between the end of a poll connection and the start of the next one (in seconds), if polling behaviour has been specified. More...
 
NSTimeInterval pollingIdleSecs
 Maximum time the Server is allowed to wait for updates in case none are available at connection time and a poll connection has been requested. More...
 
BOOL isPolling
 If set to YES, data streaming is simulated through a smart polling mechanism, that is a sequence of synchronous connections to the Server, each of which will receive the currently available updates, or wait until one is available. More...
 
LSMaxConcurrentSessionsPerServerExceededPolicy maxConcurrentSessionsPerServerExceededPolicy
 Sets the action to take when the maximum number of streaming connections is exceeded, as specified on the maxConcurrentSessionsPerServer property. More...
 

Detailed Description

The LSConnectionInfo class collects the parameters related to a connection request to Lightstreamer Server.

Method Documentation

+ (LSConnectionInfo *) connectionInfoWithPushServerURL: (NSString *)  pushServerURL
pushServerControlURL: (NSString *)  pushServerControlURL
user: (NSString *)  user
password: (NSString *)  password
adapter: (NSString *)  adapter 

Creates and retuns an LSConnectionInfo object with the specified connection parameters.

Parameters
pushServerURLLightstreamer Server URL, without the path part (i.e.: "https://push.lightstreamer.com")
pushServerControlURLLightstreamer Server URL (without the path part) to be used for control requests (i.e.: "http://push.lightstreamer.com:80"). It may differ from pushServerUrl because of the protocol. If it is nil, then pushServerURL is used.
userUser name to be supplied to the Server in the connection request.
passwordUser password to be supplied to the Server in the connection request.
adapterID of the Adapter Set to be used to handle all requests in the session. An Adapter Set defines the Metadata Adapter and one or several Data Adapters. If it is nil, the "DEFAULT" ID will be used.
Returns
The LSConnectionInfo object.
+ (NSUInteger) maxConcurrentSessionsPerServer

Returns the maximum number of streaming connections that can be concurrently open to the same Lightstreamer Server end-point (that is: host name and port).


The default value is 2 on iOS and tvOS, 3 on macOS.

+ (void) setMaxConcurrentSessionsPerServer: (NSUInteger)  maxConcurrentSessionsPerServer

Sets the maximum number of streaming connections that can be concurrently open to the same Lightstreamer Server end-point (that is: host name and port).


The change is effective immediately, but active connections that are in excess of this value won't be closed.
The maximum value is 4 on iOS and tvOS, 6 on macOS. Trying to set a higher value will clip it to the maximum.

Property Documentation

- (NSString*) adapter
readwritenonatomiccopy

ID of the Adapter Set to be used to handle all requests in the session.

An Adapter Set defines the Metadata Adapter and one or several Data Adapters. If it is nil, the "DEFAULT" ID will be used.

- (LSConnectionConstraints*) constraints
readwritenonatomiccopy

Constraints to be applied on the overall data flow from the Connection.

The specified constraints can only be used in order to restrict the constraints set by Lightstreamer Server Metadata Adapter. If it is nil, no constraints will be specified.

- (int) contentLength
readwritenonatomicassign

The length to be used by the Server for the response body on a stream connection (a minimum length, however, is ensured by the server).

After the content length exhaustion, the connection will be closed and a new connection will be automatically reopened. If it is 0, the length is decided by the Server.
The default setting is set to a very high value (50 millions).

- (BOOL) controlLinkHandlingEnabled
readwritenonatomicassign

If YES, enables the automatic handling of the server address in order to bypass the load balancer server (if any) after the first connection and allow the cleanest communication possible between Lightstreamer client and server.


The default setting is YES.

- (NSTimeInterval) firstRetryMaxDelaySecs
readwritenonatomicassign

The maximum number of seconds to wait since a disconnection before trying a new connection, for the first reconnection attempt only.

The actual delay is a randomized value between 0.0 and this value. This randomization helps avoid a connection bottleneck on the Server, that could happen if all clients tried to reconnect exactly at the same time. For the delay applied from the second attempt on see retryDelaySecs.
The default setting is 0.1 seconds.

- (BOOL) isPolling
readwritenonatomicassign

If set to YES, data streaming is simulated through a smart polling mechanism, that is a sequence of synchronous connections to the Server, each of which will receive the currently available updates, or wait until one is available.


The use of polling can become necessary in cases where the connection stream is not delivered in real time because of some router or firewall or antivirus. Even when this flag is set to NO, however, the library may detect those cases and automatically attempt to resort to a smart polling connection, provided that enableStreamSense is set to YES.
The default setting is NO.

- (NSTimeInterval) keepaliveSecs
readwritenonatomicassign

Keepalive time requested for the stream connection, in seconds.

After an inactivity of this length on the stream connection, a keepalive signal is sent by the Server. If it is 0, the keepalive time is decided by the Server. If it is too small, the Server may use a different keepalive time as well.
The default setting is 0.

- (LSMaxConcurrentSessionsPerServerExceededPolicy) maxConcurrentSessionsPerServerExceededPolicy
readwritenonatomicassign

Sets the action to take when the maximum number of streaming connections is exceeded, as specified on the maxConcurrentSessionsPerServer property.

See the corresponding LSMaxConcurrentSessionsPerServerExceededPolicy enum for a list of possible actions.
The default action is Block.

- (NSString*) password
readwritenonatomiccopy

User password to be supplied to the Server in the connection request.

- (NSTimeInterval) pollingIdleSecs
readwritenonatomicassign

Maximum time the Server is allowed to wait for updates in case none are available at connection time and a poll connection has been requested.

A zero value leads to a classical polling behaviour, while a nonzero value leads to an "asynchronous polling", also known as smart polling, behaviour. Typically, a nonzero value for this attribute is associated with a zero value for the pollingSecs property.
NOTE: since the Server, while waiting for an update, needs to keep a socket and a session active, even if the client has already closed the connection on its side, the Server may force a shorter wait.
The default setting is 30 seconds.

- (NSTimeInterval) pollingSecs
readwritenonatomicassign

Time between the end of a poll connection and the start of the next one (in seconds), if polling behaviour has been specified.

Zero is a legal value, although the Server may decide to delay request fulfilling if request frequency is too high.
NOTE: since the Server needs to keep a session active between subsequent poll connections, the Server may force the library to use a polling time shorter than requested.
The default setting is 0.

- (NSTimeInterval) probeTimeoutSecs
readwritenonatomicassign

Timeout for activity checks, expressed in seconds.

If, after a warning that the connection is stalled (see probeWarningSecs) no data has been received on the stream connection for this further time, then the connection is forcibly closed.
The default setting is 3 seconds.

- (NSTimeInterval) probeWarningSecs
readwritenonatomicassign

Timeout for activity check warnings, expressed in seconds.

If no data is being received on the stream connection and a keepalive message is late for this time, then a notification is issued to the ConnectionDelegate that the connection is stalled.
After the notification, if some data or keepalive is received before probeTimeoutSecs elapses, then a notification is issued to the ConnectionListener that the activity is normal again; otherwise the connection is forcibly closed.
The default setting is 2 seconds.

- (NSString*) pushServerControlURL
readwritenonatomiccopy

Lightstreamer Server URL (without the path part) to be used for control requests.

It may differ from pushServerURL because of the protocol. If it is nil, then pushServerURL is used.
Edition Note: HTTPS connections are not supported by the Server if it runs in Allegro or Moderato edition.

- (NSString*) pushServerURL
readwritenonatomiccopy

Lightstreamer Server URL, without the path part.


Edition Note: HTTPS connections are not supported by the Server if it runs in Allegro or Moderato edition.

- (NSTimeInterval) reconnectionTimeoutSecs
readwritenonatomicassign

The maximum elapsed time in seconds allowed for a successful reconnection attempt.

Silent reconnections are performed in case of response content length filling or if polling behaviour has been requested.
NOTE: The first connection is not checked against this timeout; this can be done by the user by observing the elapsed time in the openConnection call.
The default setting is 5 seconds.

- (NSTimeInterval) retryDelaySecs
readwritenonatomicassign

The number of seconds to wait since a disconnection before trying a new connection, from the second reconnection attempt on.

This value is not applied to the first reconnection attempt, see firstRetryMaxDelaySecs.
The default setting is 2 seconds.

- (NSTimeInterval) streamingTimeoutSecs
readwritenonatomicassign

The maximum elapsed time in seconds allowed for the first successful streaming connection attempt on a streaming session.

The timeout check is performed only when the Stream-sense feature is enabled, i.e. streamSenseEnabled is YES; if it fails, the current attempt will be discarded and a new session opening will be tried in smart polling mode.
NOTE: In case the connection is not possible at all, the polling attempt may also hang. By observing the elapsed time in the openConnection call, the user can do an overall timeout checking that does not depend on the outcome of single attempts.
The default setting is 5 seconds.

- (BOOL) streamSenseEnabled
readwritenonatomicassign

If YES, enables the Stream-sense feature, which means that in case a streaming connection can't ben opened it will automatically failback to polling mode.


The default setting is YES.

- (NSString*) user
readwritenonatomiccopy

User name to be supplied to the Server in the connection request.


The documentation for this class was generated from the following file: