TCP_ServerClose block

Short summary

Name

TCP_ServerClose

→POU type

→function

Category

more system blocks, network blocks, block with internal error diagnostic

→Namespace

logicals.system.network.tcp

Graphical interface

images/download/attachments/429720043/TCP_ServerClose-version-2-modificationdate-1562752885384-api-v2.png

Available since

version 3.2.2 (for library Standard )

Functionality

The block releases the reserved address and port previously, e.g. reserved by the block TCP_ServerOpen.

Inputs, return value


Identifier

→Data type

Description

Inputs:

serverHandle

TCP_ServerHandle

→TCP handle

Return value:

(= rc )

TCP_ErrorCode

returns the status of the TCP operation:

  • succeeded: The operation is successful.

  • invalidHandle: The handle is invalid.

Input EN and output ENO are available when →calling the block. See "Execution control: EN, ENO" for information on input EN and output ENO.

Internal error diagnostic for block

The block checks the following error cases:

The handle is invalid.

In such an error case, the output ENO of the block is set to value FALSE (or an equivalent). Moreover, the block returns the appropriate code (see the above table).

Example for usage within ST-editor

At present, there is no example for this TCP block. An example with calls of other TCP blocks is provided under "TCP_Connect block" und "TCP_ServerOpen block".

When creating your application within the ST-editor, enter a call of a block by typing the text as requested by the syntax or use Content Assist.