Herunterladen Inhalt Inhalt Diese Seite drucken

Jetter JVM-407 Betriebsanleitung Seite 287

Bediengerät
Inhaltsverzeichnis

Werbung

JVM-407
Jetter AG
RecvTimer
: Timer;
ReceiveCnt
: Int;
End_Var;
// connection timeout
ConnTimeOut := T#5s;
// receiption timeout
RecvTimeOut := T#5s;
// expected amount of data to receive
AmountToReceive := MSG_LEN;
// close all connections, init. data structures
ResConnInit := ConnectionInitialize();
If
ResConnInit >=
0
Trace('Server
running.$n');
While
(True)
Do
// try to connect
ResConnCreate := ConnectionCreate
If
ResConnCreate >
Trace('Connection
// save connection handle
ConnHandle := ResConnCreate;
// loop, as long as connection established
Loop
// timeout for the complete data packet
TimerStart(RecvTimer, RecvTimeOut * 5);
// init. receive data counter
ReceiveCnt := 0;
// loop until all expected data received or timeout
While
ReceiveCnt < AmountToReceive
And Not
ResConnReceive := ConnectionReceiveData
Then
( CONNTYPE_SERVER,
IPTYPE_TCP,
0,
TCP_PORT,
ConnTimeOut );
0
Then
established.');
TimerEnd(RecvTimer)
( ConnHandle,
NotUsed,
NotUsed,
Programmierung
Do
287

Werbung

Inhaltsverzeichnis
loading

Inhaltsverzeichnis