Lightstreamer WinRT Client 1.0.2
ContentsIndexHome
PreviousUpNext
LSClient.OpenConnection Method

Opens a connection to the Server with the supplied parameters. More precisely, the Server will initiate a push session for this client, which will be accessed through a streaming connection or through a train of polling connections, depending on the configuration parameters. If a connection is already open, it is closed first. 

If streaming (as opposed to polling) is specified in the connection parameters and the environment does not allow HTTP streaming, then the "Stream-sense" feature, if enabled, is activated; hence, if the streaming connection has not yielded any data after a few seconds, a polling connection is tried instead. 

The method is blocking; it returns only after a connection to the Server has been established or the attempt has failed.  

Edition Note: Connections from the .NET Client Library are not supported by the Server, if it runs in Allegro edition. 

Edition Note: Connections from the .NET Client Library are not supported by the Server, if it runs in Moderato edition. 

 

C++
public: void OpenConnection(ConnectionInfo info, IConnectionListener listener);
C#
public virtual void OpenConnection(ConnectionInfo info, IConnectionListener listener);
Visual Basic
Public virtual Function OpenConnection(info As ConnectionInfo, listener As IConnectionListener) As void
Parameters 
Description 
ConnectionInfo info 
Contains the Server address and the connection parameters. A copy of the object is stored internally. 
IConnectionListener listener 
Receives notification for connection events.  
Exceptions 
Description 
in case of connection problems. 
in case of errors in the supplied parameters or in Server answer. In normal operation, this should not happen. 
in case the Server has refused the connection request because of the constraints imposed either by the Metadata Adapter or by Server configuration.