Syntax, Example, 13 the onsessiondisconnected event – Casio Naurtech CETerm Ver.5.5 Scripting Guide User Manual

Page 94

Advertising
background image

N

AURTECH

W

EB

B

ROWSER AND

T

ERMINAL

E

MULATION FOR

W

INDOWS

CE

AND

W

INDOWS

M

OBILE




CETerm Scripting Guide

Page 94


Syntax

function OnSessionDisconnect ( session )

session

– index of session which was disconnected by user.


Example

This example will switch to the next connected session when the current session
is disconnected. If there are no other connected sessions, then CETerm will exit.

/* OnSessionDisconnect */
function OnSessionDisconnect ( session )
{
// Switch to next connected session
CETerm.SendIDA( "IDA_SESSION_NEXTLIVE", 0 );

if (CETerm.ActiveSession == session)
{
// Still on current session, no others connected.
CETerm.PostIDA( "IDA_PROGRAM_EXIT", 0 );
}
}


4.13

T

HE

O

N

S

ESSION

D

ISCONNECTED

E

VENT

The OnSessionDisconnected event is fired when a terminal emulation (TE)
session is disconnected by the remote host. The handler can be used to attempt
to reconnect to the host or perform other cleanup tasks.

Syntax

function OnSessionDisconnected ( session )

session

– index of session which was disconnected by remote host.


Example

This example will check for RF coverage and attempt to reconnect if RF is
detected.

/* OnSessionDisconnected */
function OnSessionDisconnected ( session )

Advertising
This manual is related to the following products: