Specifies constants indicating the state of a Session's connection.

Namespace: ININ.IceLib.Connection
Assembly: ININ.IceLib (in ININ.IceLib.dll) Version: 0.0.0.0 (22.3.0.218)

Syntax

C#
public enum ConnectionState
Visual Basic
Public Enumeration ConnectionState

Members

Member nameValueDescription
None0The session's connection does not exist.
Up1The session's connection is up.
Down2The session's connection is down.
Attempting3The session is attempting to re-establish a connection.

Remarks

This enumeration is used in conjunction with ConnectionStateReason by Session to specify the state of its connection.

The ConnectionState state machine looks like the following:

CopyC#
        /------\ <------------ /----\
        | Down |               | Up |
        \------/               \----/
          |  ^                  ^
          |  |                  |
          |  |   /--------------/
          V  |   |
o-----> /---------\
        | Attempt |
        \---------/

The following are connection states (followed by their transition symbols):

  • Up - (U)
  • Down - (D)
  • Attempting - (A)
  • None - (N)
The following are connection state reasons (followed by their applicable transitions):
  • Switchover - (U->D)
  • SessionTimeout - (U->D)
  • UserLogOff - (U->D)
  • LogOn - (N->A, A->U)
  • LogOnFailed - (A->D)
  • AnotherLogOn - (U->D)
  • StationDeactivated - (U->D)
  • StationDeleted - (U->D)
  • AdminLogoff - (U->D)
  • ServerNotResponding - (U->L, A->D, L->A, A->L)
  • None - (Initial state)

Examples

The following example demonstrates usage of a Session object.
CopyC#
using ININ.IceLib.Connection;

Session session = new Session();

... // Further processing

if (session.ConnectionState != ConnectionState.Up)
{
  // There is no active connection.
}

Version Information

Supported for IC Server version 2015 R1 and beyond.
For 4.0, supported for IC Server version 4.0 GA and beyond.
For 3.0, supported for IC Server version 3.0 GA and beyond.

See Also