TCP_Server (FB)

FUNCTION_BLOCK PUBLIC FINAL TCP_Server EXTENDS LConC IMPLEMENTS IServer, IServer_Internal

Sets up a server over the ip and port specified in itfIPAddress and uiPort. A server can handle several connections. The output itfServer of these function block can be used to establish a connection via TCP_Connection.

InOut:

Scope

Name

Type

Initial

Comment

Inherited from

Input

xEnable

BOOL

TRUE: Activates the defined operation FALSE: Aborts/resets the defined operation

LConC

Output

xBusy

BOOL

TRUE: Operation is running

LConC

xError

BOOL

TRUE: Error condition reached

LConC

eErrorID

ERROR

LConC

Input

udiMaxConnections

UDINT

5

Maximum number of connections queued in TCP Stack

itfAsyncProperty

IAsyncProperty

itfTLSContext

ITLSContext

itfTSNContext

ITSNContext

itfIPAddress

IIPAddress

uiPort

UINT

Output

xActive

BOOL

itfServer

IServer