Download ScadaWorks Technical Reference Manual

Transcript
Section XXIV ISaGRAF Function and Function Blocks 637
FBD
Syntax
DINT SockRelease( DINT Sock );
Parameters
sock: DINT Socket handle to be released from remote connection.
Return Values
rslt: DINT
-2 invalid SOCK.
0 = release complete.
1 = in progress (retry call later until complete).
Remarks
ST Example
None
(* Release the connection to remote client *)
SockReleaseResult := SockRelease( Socket1Handle );
case SockReleaseResult of
(* Success *)
0:
return;
(* Operation blocked (socket busy try again later) *)
1:
(* nothing to do here, just attempt to write again *)
(* possibly implement timeouts and retries here *)
end_case;
Free A Socket From Memory -- SockFree()
Type
C Function
Function
Release remote connections and free socket link handle.
FBD
Syntax
DINT SockFree( DINT SOCK );
Parameters
sock: DINT Socket handle to be released from remote connection.
Return Values
rslt: DINT
-2 invalid SOCK.
0 = release complete.
1 = in progress (retry call later until complete).
Remarks
None