TCP_Connection (FB)
FUNCTION_BLOCK PUBLIC FINAL TCP_Connection EXTENDS LCon IMPLEMENTS IConnection, IConnection_Internal
Encapsulates the connection between client and server
The TCP_Server function block will activate a related
TCP_Connection function block,if a client has successfully connected to its server.
itfConnection can be used as input itfConnection for function blocks TCP_Write,
TCP_Writer, TCP_Read and TCP_Reader.
- InOut:
Scope
Name
Type
Comment
Inherited from
Input
xEnableBOOLTRUE: Activates the defined operationFALSE: Aborts/resets the defined operationLCon
Output
xDoneBOOLReady condition reached
LCon
xBusyBOOLTRUE: Operation is runningLCon
xErrorBOOLTRUE: Error condition reachedLCon
eErrorIDLCon
Input
itfServerThe related TCP_Server function block(One server function block can manage more than one connection function block).Output
xActiveBOOLTRUE if a Connection is established
itfConnectionThe established connection to the related clientValid, as long xActive = TRUE
Methods:
GetClientAddress
Read
Write
Structure: