restServerFree (Function)

Top  Previous  Next

Architecture:

NX32L

Device support:

ALL

Firmware version:

2.10.00


This function will release a REST server.

If the server is currently running it will be stopped.

 

 

Input:

handle : SYSHANDLE

A handle to the server.

 

 

Returns: INT

1


- Success

0


- Not supported

-1


- Invalid handle

 

Declaration:

FUNCTION restServerFree : INT;
VAR_INPUT
  handle    : ACCESS SYSHANDLE;
END_VAR;

 

 

Example:

INCLUDE rtcu.inc
 
PROGRAM example;
VAR
  rc       : INT;
  server   : SYSHANDLE;
END_VAR
BEGIN
 
  rc := restServerCreate(handle := server, port := 8080);
  ...
  rc := restServerFree(handle := server);
END;
END_PROGRAM;