restServerStop (Function)

Top  Previous  Next

Architecture:

NX32L

Device support:

ALL

Firmware version:

2.10.00


This function will stop the REST server.

 

 

Input:

handle : SYSHANDLE

A handle to the server to stop.

 

 

Returns: INT

1


- Success

0


- Not supported

-1


- Invalid server.

-3


- Failed to stop server.

-27


- Server is not running

 

Declaration:

FUNCTION restServerStop : INT;
VAR_INPUT
  handle    : SYSHANDLE;
END_VAR;

 

 

Example:

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