CmpTlsShutdown (FUN)¶
FUNCTION CmpTlsShutdown : RTS_IEC_RESULT
There are two ways to shutdown the TLS connection: bidirectional: The first call of TlsShutdown will send the shutdown message. The operation will return ERR_TLS_RETRY_OPERATION.
Then the function has to be called again. If the acknowledge of the peer was received ERR_OK will be returned. If the acknowledge was not received yet the function will return ERR_TLS_WANT_READ.
- unidirectional: The first call of TlsShutdown will send the shutdown message. The operation will return ERR_TLS_RETRY_OPERATION.
- Close the IO channel and clean up. Don’t wait for the acknowledge of the peer. 
- InOut:
- Scope - Name - Type - Comment - Return - CmpTlsShutdown- RTS_IEC_RESULT- Result of this operation. May be one of these values:
- ERR_OK: No error. Everything worked as expected. 
- ERR_NOTINITIALIZED: The TLS component was not initialized proberly. 
- ERR_TLS_CONNECTION_CLOSED: The TLS connection is closed. 
 - ERR_TLS_WANT_READ: The operation needs TO read data FROM the IO system. There is no data available. 
- ERR_TLS_WANT_WRITE: The operation needs to write data to the IO system. This is not possible.
- ERR_TLS_RETRY_OPERATION: Something went wrong. Try the same function call again 
- ERR_TLS_IO_SYSTEM: An error in the unterlaying IO system. 
- ERR_TLS_INTERNAL: An internal Error of the TLS Component 
- ERR_FAILED: Unknown error. 
 
 
 
 - Input - hTlsConn- RTS_IEC_HANDLE- Handle of the TLS connection, created with one of the TLSxxxOpen functions 
